About this project:
In this lesson, we will show how to use W5100 Ethernet Shield and Arduino UNO board to work as Web Server to get remote temperature/humidity from DHT11 sensor and control LED throw browser(or mobile APP).
|3.3v or 5v||VCC|
|D8||LED long pin|
|GND||LED short pin through resistance|
Connect the Arduino UNO board to computer via USB cable,download sketch from https://osoyoo.com/driver/ethernet_iot/lesson4/w5100_dht11.ino and load it into Arduino IDE(Version1.6.4+), Make sure DHT library library has been installed in Arduino IDE.
After do that,choose the corresponding board type and port type as below
Now you can upload the sketch code to Arduino UNO by click UPLOAD button(press Ctrl+U key)
When the code is running in Arduino board, open the Serial Monitor(set baud rate to 9600in lower right corner), you will see serial monitor display your device IP in following page:
Visit above IP address from browser, You can see the temperature and humidity data in browser which are collected by DHT11 sensor which is connected to D8 pin as following:
Real time temperature: 0.00 C ;real time Humidity: 0.00%
Now in your Arduino IDE serial monitor, you will see something like GET /…… , this is the message comes from remote browser.
When you click Turn on LED button in this page, the LED connected to D7 will turn on. The serial monitor will shows GET /?LEDON HTTP/1.1 , this is the message from browser which told Arduino to turn on LED.
Now When you click Turn off LED button in browser page, the LED connected to D7 will turn off. The serial monitor will shows GET /?LEDOFF HTTP/1.1 , this is the message from browser which told Arduino to turn off LED.
DownLoad Url osoyoo.com