Hello!
I’m learning arduino on Sparkfun ESP8266 Thing Dev board.
I have connected photoresistor to the Thing using this example -
http://static.cactus.io/img/hookups/bre … dboard.jpg
The code is simple :
int LDR_Pin = A0;
void setup() {
Serial.begin(9600);
Serial.println("LDR Light Sensor | cactus.io");
}
void loop() {
Serial.println(analogRead(LDR_Pin));
delay(100);
}
The problem is with the analog reading values - they are fluctuating when photoresistor is reading rooms lights and values looks more like a sinusoidal wave. When the sensor is covered and in the dark, the values are more linear.
Serial plotter screenshot :
https://snag.gy/DqFxsa.jpgAny ideas what I’m doing wrong?