Send Data to SmartWorks

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


    Figure 1.