Programmable LED

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.

How is it done?

It consists of an LDR, an LED and a tiny microcontroller. I used a ATtiny13v which is able to run with 1.8V. That makes it easy to power it with smallest batteries or even fruits.



All components can be easily used on a breadboard. Be aware, that you will need a separate programmer or an ISP adapter to program it.

The final version

The final version is powered by a CR2032 cell. It should have enough power for at least two weeks, depending on the light sequence it plays.

I have done a step-by-step instructable here.


Here are some responses to the instructable


  1. Interesting .. It would be neat to put a little solar power to it (solarbotics has some neat circuits, to store power when available into capacitors).


  2. I have been already searching for solar panels, but haven’t found the right size. At least not in Germany. And I thought, we were such a “green” country …


  3. Pingback: Black
  4. I would like to see how flashes propagate and patterns emerge if the rectangular grid is wrapped around a torus. (Need more units, in that case, probably.)


  5. Hey Alex,

    Your project is fascinating. This is my first step away from from Arduino, so I’m learning. I’ve got it breadboarded and your hex file uploaded, but I’m not getting the expected output. When powered up, I get five slow flashes, followed by a burst of quick ones. After 8 – 9 seconds, I get another burst of quick flashes, and that is it. Any ideas where to look? The LDR is 30K dark, 3k roomlight. If I used your hex file, the make file isn’t relevant, right (newbie question)?


  6. Hi Ken,

    that depends on what you expected ;)
    It looks if it is working already. The slow flashes show the power up cycle. The fast flashes signal the start or the end of the recording mode. At start up the controller is in recording mode, so you can try to use a flashlight to program a sequence.
    If it is not responding, try to experiment the THRESHOLD value in the source file.

    And no, the makefile is only relevant if you compile it from source.

    HTH, cheers,


Comments are closed.