To publish our distance sensor data to ThingsBoard, we first need to create a ThingsBoard Device:
- Log in to your account at https://demo.thingsboard.io/login
- Click on Devices, and then the large orange + sign at the bottom-right corner of the screen:
- Type in RobotEyes for the Name, leave the Device type as default, and put in a meaningful description under Description
- Click ADD
- Click on RobotEyes to get a menu sliding out from the right
- Click COPY ACCESS TOKEN to copy the token onto your clipboard
- Paste the token into a text file
For our code, we will be using the MQTT protocol. If the Paho MQTT library has ...