Introduction About Osoyoo Wifi Shield for Arduino:
Osoyoo Wifi Shield for Arduino is Wifi device which allows Arduino compatible boards(UNO,MEGA2560,Leonardo etc) to connect to Wifi network and become a node of Internet of Things(IoT).
To exchange data with other IoT devices, Osoyoo Wifi shield can make Arduino to work under three different roles:
Purpose of this lesson:
In this lesson, we will tell you how to make Arduino+Osoyoo Wifi shield working as a web server(Role 2). After you connect the hardware and install software in this lesson, you can use web browser to get Temperature/humidity data from a remote DHT11 sensor and to turn on/off a remote LED which is connected to Arduino .
Parts and Device:
Osoyoo Wifi Extension shield x 1 pc
Arduino UNO compatible board x 1 pc
DHT11 Temperature/Humidity sensor x 1 pc
LED x 1 pc
Broadboard x 1 pc
Circuit Connection Graph:
|DHT11 pin||Wifi Shield on Arduino|
|LED||Wifi Shield on Arduino|
|short pin||GND(through 400 ohm resistor)|
The Osoyoo Wifi Shield connects ESP8266 TX/RX pin to Arduino D3/D2 pin by default. So in Arduino sketch code, we need use Software Serial Port to communicate with ESP8266 (set D3 as RX and D2 as TX in softwareserial object).
To use this wifi shield in Arduino IDE, we need download WiFiEsp-master library from following link:
To use DHT11 sensor, we need use DHT library which should be downloaded from following link:
You need go to Arduino IDE ->Sketch ->Include Library ->Add ,Zip library to load above zip files into Arduino IDE.
After Installing DHT.zip library, you need download sample sketch code from following link:
Then load the sketch into Arduino. Remember to change line 28/29 and make the wifi_hotspot_ssid and wifi_password to match your wifi router setting.
Once the code is running, you can go to your Arduino Serial window(top right corner) and see the IP address of your wifi shield as following:
you can also type AT+CIFSR command in above window and click send to get ip address.
Now go to your browser and visit above IP address, you will see following page:
You can see the temperature and humidity data has been sent by internet to your browser.
You can click Turn On or Turn Off button to toggle LED . This means you can send control command to remote device.
DownLoad Url osoyoo.com