This sample application is created to demonstrate the capability of TPP2(G3) to connect securely to the cloud. The chosen server to connect to is Microsoft Azure IoT Hub. The application samples the onboard temperature sensor and accelerometer values every minute and sends it as a telemetry to Microsoft Azure IoT Central. The sample also has a web server that allows you to easily input the credentials of Azure IoT Central.
Tip
Before using this test application, it is important to know that AppBlocks, our no-code, in-browser, flowchart-based application development system for TPS supports connectivity to Azure and also AppBlocks Cloud (ABC). AppBlocks automatically generates all the code required for this application. Therefore, we recommend using AppBlocks for your project. However, if you have an existing project and want to upgrade it to Gen.3 for secure cloud connectivity, using this test application might help you significantly.
Please also note that the base code for this application was generated by AppBlocks!
If you already have a Microsoft Azure account, have worked with IoT Central before and you have an application, the path is easier. Just create your own device instance on IoT Central, copy its credentials, enter the web interface of the device and paste them in. Save, and your device will connect to the cloud and will be able to send telemetries to Azure.
If you do not have an account, you can follow documentation that was previously created for our OSS product line, here are some links:
- Microsoft Azure Terminology and Configuration
- Creating Microsoft Azure Account
- Creating an Application
- A TPP2(G3) board
- Optionally, one Tibbit #10 for the power supply
- Optionally, one Tibbit #18 to go along with Tibbit #10
- Build and load the application to the TPP2(G3) board.
- Find out the IP of the device; note that this application runs DHCP and will get an IP from your router's DHCP server.
- Open a browser tab, type the IP address, and open the page.
- Go to your Microsoft IoT Central Application, create a device instance, and attach a template to it. You can download our template here, and import it to your Azure IoT Central Application. You may also refer to this tutorial; however, it is important to note that although the general steps are the same, those instructions were not built for this device, and are instead for OSS.
- Press connect, and you will see the credentials of the cloud instance. Copy these credentials to your clipboard by pressing the blue copy button to the right of each field.
- Back on the TPP2(G3)'s application webpage, paste the device credentials you copied from IoT Central in the corresponding fields and press the save button.
- Go to your IoT Central Device instance and check for telemetries in the "Raw data" pane. You should be able to see telemetries (json format) that include your sensor values. If you like to visualize your data, you can refer to this tutorial; however, it is important to note that although the general steps are the same, those instructions were not built for this device, and are instead for OSS.
Feel free to contact [email protected] in case you have questions.