Send Data to SmartWorks
- If you haven’t already, make sure to download the user input and dashboard Python template files..
-
In Visual Studio Code, add the following:
- In the credentials func.cpp file, define the following variable: const char* server found in main invoke function.
- In the humidity.cpp file, define the following variables: DHTPIN and DHTTYPE.
- In the main.cpp file, define the following variables in the DEFINE GLOBAL VARS section: publishHumidityTopicSTR, publishHumidityTopic dataSTR, and subscribeTopic_STR.
- Compile the code and upload to the microcontroller or ESP32 in this case.
-
Check that the data is being sent to the Raw History section of your
Thing.
Figure 1.