Value Display Widget is another widget that we are going to use today. It is used to display values. We are going to monitor Temperature and Humidity using this widget.
In our previous blog, we have interfaced the DHT22 Sensor with Arduino. Now in this blog, we send data to Blynk so that we could monitor it over IoT.
- If you are doing it for the first time please follow DHT Sensor Interfacing for getting an idea over DHT22
- Who is using Blynk for the first time go through this tutorial for Blynk app Installation and Setup.
- For first-time NodeMCU users, please follow this blog first. Programming NodeMCU Step by Step Using Arduino IDE
DHT 22 has a one-wire interface. In this project, we have connected DHT22 in the D2 pin of NodeMCU. Virtual Pin V1 and V2 are used for the Value Display Widgets.
For this project, we need
- NodeMCU
- DHT22
- Jumper Wires
- Blynk App
Add two Value Display Widgets, named as Temperature and Humidity. Set the Inputs as V1 for Humidity and V2 for Temperature as shown below.
Now open the IDE copy-paste the code. Carefully delete YourAuthToken and paste your auth code there. Then delete YourNetworkName and write your WiFi router or phone's hotspot name there. Finally, delete YourPassword and put your Wi-Fi or hotspot password. Then you can upload the code. Once uploaded your NodeMCU should get connected to your WiFi network.
Source Code:
Results:
No comments:
Post a Comment