I'm using an LDR photoresistor to control two LEDs. The coding is simple: above one value the red LED lights up and below one value the green LED lights up (never on simultaneously).
But the LDR is always showing the maximum value (1023) even in low light, preventing me from control the LEDs correctly.
What can I be doing wrong?
(I'm using a 10kOhm resistor on the LDR terminal 1).