Authorized Online Retailers:
In Lesson 2, we learned how to use browser send control signal to a remote Arduino device and turn On/Off an LED. In this lesson, we’ll show how to read remote sensor data to your browser. We will use a photoresistor(light sensor) to read remote environment light value. This is very useful in farms, greenhouses to control the light of plants.
|Ethernet shield W5100||1|
|Photoresistor sensor Module||1|
Connect your Photoresistor with Uno as following diagram
A couple of notes before you get started:
Download the sketch file from : https://osoyoo.com/driver/ethernet_iot/lesson3/w5100-lesson3.zip
Unzip the download file and enter the folder W5100-lesson3, double click the w5100-lesson3.ino file, upload the sketch to your Arduino. Open your Serial Monitor, you can see your router will assign an IP address to your Arduino as following:
In above example, 10.0.0.45 is the IP address of my Arduino.
Now use another computer or your cell phone’s browser to visit url : http://10.0.0.45
In your photoresistor sensor is exposure under light. Your browser will show following result:
Real time Photoresistor value: 19, 99% of maximum sensor value
99% means the environment is very bright.
If you use hand to block the photoresistor from light, your will see following result
Real time Photoresistor value: 1020, 1% of maximum sensor value.
1% means the environment is very dark.
DownLoad Url osoyoo.com