This week I set out to make a card stock box with flower cut-outs which consists of an LED which lights up when it gets dark and turns off when enough light surrounds it. To make it happen, I started out with making my box which would house my Arduino and breadboard circuit, with a connection to the computer.
I created the following schematic and started to wire the breadboard to the Arduino. Using a 10K ohm resistor for the photocell and the red LED, I proceeded to code the LED to respond to the amount of light the photocell receives.
After connecting to power, compiling the sketch and uploading to the Arduino, the photocell responded to the light being on and off, in turn, causing the LED to turn light on and off as well. The flowers light up prettily as the LED turns on.