This approach uses (at least) 3 LDR's between the rails and all are used for detection purposes. The ambient light they see does not need to be constant but should affect them all more or less ...
The Arduino Uno is powered by the ATmega328P, an 8-bit microcontroller that runs at 16 MHz. It has 32 KB of flash memory, 2 KB of SRAM, and 1 KB of EEPROM. The board has 14 digital I/O pins (of which ...