Go to Sketch
> Include Library
> Manage Libraries...
> DHT sensor library for ESPx by beegee_tokyo
> Install
The DHT11 sensor is connected as follows:
DHT11 | NodeMCU |
---|---|
VCC | 3.3V |
DAT | D1 |
GND | GND |
Schematics:
- Download these respiratory as ZIP file and extract.
- Open
esp_8266.ino
file. - Change the following codes.
WIFI_SSID
to your WiFi SSIDWIFI_PASSWORD
to your WiFi PasswordSCOPE_ID
to your Scope ID generated in Azure IoT CentralDEVICE_ID
to your Device ID generated in Azure IoT CentralDEVICE_KEY
to Primary/Secondary Key generated in Azure IoT Central
- Upload and run.
*PS: It takes 12 seconds to update once in IoT Central.