2011/09/14

Pretty lights

In a fit of weakness, I bought 2 silly USB mail lights. This are basically a PIC that talks USB on one side, and turns coloured leds on and off. They come with software that is supposed to check if you have mail and change colour depending on what's going on. Of course, the supplied software is Windows only and doesn't even work it seems.

Not that I care about a light that tells me if I have e-mail pending. But controling pretty lights from the computer? I'm all over that. Someone had already written a script in Python to control these things. I ported it to Perl because, well because I like Perl.

To use it, you must have Device::USB installed. And perl, of course.

http://pied.nu/Perl/setcolour

Doing setcolour will show you all devices installed

Doing setcolour 1294:1320 1 will set all mail devices to colour 1, which is blue on one of my devices, green on the other.

Doing setcolour 2-7 2 will set one mail device to colour 2, which is red on both my devices.

No comments: