Song Queue Blinkenlights
This is a gadget I made to tell me at a glance the size of the various message queues that I manage at TuneCore. A steady light means the queue is not very long; a rapidly blinking light means that the number of items in the queue is very large and it needs attention.
I built it over the weekend using an Arduino microcontroller with an ethernet shield. It requests the queue sizes from a web server once a minute.
There were two major hurdles in the design of the program. One was how to parse the HTTP response. It took some thought (and Googling) but what you have to do is build string buffers as you read the the response one character at a time. Then process the buffer to determine if your looking at the HTTP header or the actual data that you've served.
The other programming problem was getting the lights to blink independently of one another. It was a difficult because the Arduino only does one thing at a time. I was able to accomplish this using the Metronome library, although there is still some blocking going on when the lights blink. I believe the solution will be to remove the delay() statements in the blink code.
This is the first time I've felt that a project is worthy of mounting in a project box. I got all the LEDs, mounts and box from Radio Shack, and bought a Dremel and label maker at Target. The next few hours were spent cursing and carving the plastic and soldering everything together.
Flickr