Inspired by various LED Throwies, blinking LEDs and similar instructables I wanted to do my version of an LED controlled by a microcontroller.
The idea is to make the LED blinking sequence reprogrammable. This reprogramming can be done with light and shadow, e.g. you could use your flashlight.
This is my first instructable, any comments or corrections are welcome.
Update 12/08/2008: There is now a kit available at the Tinker Store.
Here is a video of reprogramming it. Sorry for the quality.
Step 1: How it works
An LED is used as output. As input I used an LDR, a light dependent resistor. This LDR changes its resistor as it receives more or less light. The resistor is then used as analog input to the microprocessors ADC (analog digital converter).
The controller has two modes of operation, one for recording a sequence, the other for playing back the recorded sequence.
Once the controller notices two changes of brightness within half of a second, (dark, bright, dark or the other way round), it switches to recording mode. In recodring mode the input of the LDR is measured multiple times a second and stored on the chip. If the memory is exhausted, the controller switches back to playback mode and starts to play the recorded sequence.
As the memory of this tiny controller is very limited, 64 bytes (yes, bytes!), the controller is able to record 400 bits. That is space enough for 10 seconds with 40 samples per second.