6. Blinking and Glowing LEDs


This week, we covered embedded electronics. The assignment itself was simple - design a board with a LED and a button, and program it to do something in as many languages as possible.

First, I learned about Eagle, a software that helps you lay out your board. In the span of a week, I went from not knowing what Eagle is to spending 4 hours figuring out a board layout because I was totally hooked. MIT, where you learn to drink from the fire hose.

My first attempt at programming was board involved making the button toggle between having the LED blink and turning it off:

Hint: hot glue is really handy. I learned the hard way that one must be very careful while unplugging the FTDI cable, or you might rip off the entire pin.

After I had the blinking LED working, I decided to be more adventurous and use PWM (pulse width modulation) to alter the brightness of the LED.

This led to many, many hours of pouring over the ATTiny44 datasheet. I learned about the importance of timer registers, especially which bits to turn on.

At this point, I got really ambitious. Let’s do a RGB LED, and two buttons!

The board took me 4 hours to layout. Fun!


Reading datasheets is kind of zen. Also, hot glue is my friend.