in Development, Networking

Iron Man LED Status Mask

In the category of things I do when I should be preparing to move house, I present the Iron Man Status Mask. A Raspberry Pi running a Python based RESTful API inside an Iron Man mask that can indicate any colour via his eyes. As you can imagine, Lindsay is thrilled.

The mask itself was a gift from Richard & Adi a few birthdays ago, and simply had two white LEDs and an on/off switch. I gutted the mask, replacing the LEDs with individual RGB LEDs hooked up to the GPIO pins of a Raspberry Pi I had laying around.

The code is some hacky Python that starts a webserver, listening for requests of the form /left/rrggbb, /right/rrggbb, /both/rrggbb, and /blink/rrggbb where rrggbb is a HEX colour. The code looks like this:

I’m using two Squid LEDs from Simon Monk, along with his Python code to drive it. I did spot a minor bug in the set_color_rgb method I’m using, so there is a pull request in to fix it.

Next step: mount this in the office and use it as a status display. If the build fails, Iron Man gets angry? :)