Computing stuff tied to the physical world

A little GUI for the RGB LED strip

In Software on Jun 16, 2010 at 00:01

After yesterday’s post, this RGB strip control project is essentially done. Keep in mind that I’m doing this only to adjust what comes out as “white”. I’ll leave light levels and color variations up to nature, since all I need to do is look out the window…

But since wireless control is present anyway, I might as well create a little demo using the JeeMon software.

So here goes. The setup I’m using is as follows:

Screen Shot 2010 06 14 at 16.31.37

The JeeNode is configured as node 30 and the JeeLink as node 1 (in the same group). The manual way to send out a color command via serial USB is to type:


Where each of the four values are in the range 0..255 (0 = off, 255 = full on).

Now the GUI version (Mac OS X):

Screen Shot 2010 06 14 at 18.21.51

The code for this is as follows:

Screen Shot 2010 06 14 at 18.16.26

Like everything in JeeMon, it’s cross platform since it uses Tcl/Tk.

Here are the screen shots for Linux (Ubuntu) and Windows (W7, XP, 2K), respectively:

Screen Shot 2010 06 14 at 18.01.42 Screen Shot 2010 06 14 at 18.35.25

Screen Shot 2010 06 14 at 18.14.21 Screen Shot 2010 06 14 at 18.09.26

As you can see, the light gray background color was adjusted for the Mac – on some of the other platforms it needs to be darkened a bit to match the default label background.

Anyway. I’m not a GUI wizard, so this’ll have to do for now…

  1. Heh, now all you need to do is let your readers adjust the values, and mess with your lighting.

    • Not the end of the world, but that’s why this is only an example … my setup is different.

  2. I meant that you could run a script on the website to let someone change those values and alter the lights in your lab – which would totally defeat your original purpose, which was to get a more ‘white’ light in your lab.

    I enjoy reading your blog, it’s great.

  3. Use ttk::button, ttk::label, etc, and they’ll follow a common theme – no trouble with making your frame backgrounds match. Uhm, maybe with . – but you can begin by gridding in a ttk::frame, or by using [. configure -background [.b cget -background]] to copy the background colour.

    • Thx, the ttk::frame trick works great. When I tried .l1′s background (.b has no -background), I got the desktop color (8.6b1 / Ubuntu) – which surprised me.

Comments are closed.