The steps for this recipe are as follows:
- Add your Wi-Fi connection string. Change the strings on lines 10 and 11 of the iot_configs.h file:
#define IOT_CONFIG_WIFI_SSID "IoT_Net"
#define IOT_CONFIG_WIFI_PASSWORD "password1234"
- Get a device connection string from Azure IoT Hub and insert it on line 19 of iot_configs.h:
#define DEVICE_CONNECTION_STRING "HostName=myhub.azure-devices.net;DeviceId=somerandomname;SharedAccessKey=TWnLEcXf/sxZoacZry0akx7knPOa2gSojrkZ7oyafx0="
- With your ESP32 attached to your computer via a USB, click on the PlatformIO icon in the left panel and then click on Upload and Monitor: