Buy from US | Buy from UK | Buy from DE | Buy from IT | Buy from FR | Buy from ES | Buy from JP |
In Lesson 3, we learned how to read remote Photoresistor sensor data to your browser. As farmer or agriculture scientist, in addition to get the brightness data of your greenhouse, you also need to know the temperature/humidity of your plant field.
In this lesson, we will use a DHT 11 sensor to read remote environment temperature and humidity data through browser.
Arduino UNO board x 1
OSOYOO ESP8266 WIFI Shield x 1
DHT11 sensor Module x 1
USB cable x 1
Jumper wires several
First, please insert the ESP8266 wifi Shield into your UNO board,
Arduino UNO Board | DHT11 sensor module |
D2 | S |
GND | – |
5V | + |
Step A)Install latest Arduino IDE (If you have Arduino IDE version after 1.1.16, please skip this step).Download Arduino IDE from https://www.arduino.cc/en/Main/Software?setlang=en, then install the software.Step B) If you have DHT11 library, please skip this step. If you have not installed DHT11 library, please download the zip file from https://osoyoo.com/wp-content/uploads/samplecode/DHT.zip , then in your Arduino IDE ->Sketch->Include Library->Add .ZIP Library and select the DHT.zip file you just downloaded, and upload it to Arduino.Step C) Connect the Arduino UNO board to computer via USB cable,
Step D) Open the Arduino IDE and choose corresponding board type and port type for you project.
Step E) Download sample code from https://osoyoo.com/driver/Esp8266_Arduino_IOT/lesson4/esp8266-lesson4D.zip, unzip the file and double click the esp8266-lesson4D.ino file.
Step F) Arduino IDE: Click file -> click Open -> choose code “esp8266-lesson4”, load up the sketch onto your Arduino.char ssid[] = “******”; // your network SSID (name)
char pass[] = “******”; // your network password
please replace the ****** with your correct wifi SSID and password, otherwise your project can not connect to Internet.
After change above lines, load the sketch into Arduino IDE.
Open your Serial Monitor, you can see your router will assign an IP address to your Arduino, as following:
Now use another computer or your cell phone’s browser to visit url : http://192.168.50.116
Your browser will show following result:
DownLoad Url osoyoo.com