Professional Documents
Culture Documents
Light Intensity Monitor Using Webapi
Light Intensity Monitor Using Webapi
Aim:
To monitor the Intensity of Light and plot the data as a Graph in webAPI or Thinkspeak.
Components:
Arduino Uno R3
Multimeter
Wifi Module ESP-8266
Photoresistor
Resistors x3
Wires
Procedure:
Code:
// provide your API key below in between thr '=' sign and '&' sign
String uri = "/update?api_key=9W0UVIKCXZWTNDFO&field1=";
int setupESP8266(void)
{
// Start our ESP8266 Serial Communication
Serial.begin(115200); // Serial connection over USB to computer
Serial.println("AT"); // Serial connection on Tx / Rx port to ESP8266
delay(10); //Wait a little for the ESP to respond
if (!Serial.find("OK"))
return 1;
Graph:
Inference:
We can infer that the graph keeps on varying for different light intensity adjusted in the photoresistor,
also this adjustment voltage can be measured in the multimeter connected to it.
Result:
Hence the output has been obtained and verified. The graph has been plotted in WebAPI or thinkspeak.