LED Color Changer via control system

I know - super simple, but wanted to do something while I wait for some hardware to come in for more projects.


Anyway, here’s a little bit of background. I’m an AMX programmer by day and tinkerer by night, so I thought these two products were a match made in heaven. Essentially, I put a color selector on a “touch panel” (actually, an iPad) that sets an invisible button’s color and then sends the hex color value to the imp server, parsed and then sets the LED on the Hannah.

Again, nothing fancy, but integrating the imp with a high end control system like AMX is my primary focus.

Excuse the music, but it’s much better than the original audio - dog drinking water, wife dropping things & a feminine product commercial on the television.

http://www.youtube.com/watch?v=HDf7PoHRKlo

Very sweet, pity the LED is so small!


I enjoyed the music!  Very nice! Thanks for sharing.

Very nice. I’m a newbie to color. I have a few questions. Are you using RGB code or HUE to control the color? What about brightness? Any recommendation for RGB LED driver?

Thanks.

The AMX processor returns the color in triplet hex, so FFFFFFFF for white, 000000FF for black. The last value is the opacity. I was going to tie the brightness to the potentiometer on the Hannah, but put that on the back burner. The parsing from HEX to RGB is a little rough, but hey, many ways to skin a cat!


I’m completely new to squirrel & scripting in general, so pardon my learning process. :slight_smile:

Here is the imp code.
Here is the AMX code.

I’m actually just using the LED on the Hannah for this.

cool !

Sorry for a silly question. I just got my imp today and commisioned it with an Adafuit april board.

Can I control the Imp’s LED? I’m making a temp control project and I want the LED to be red for heating, green for in range, and blue for cooling. I would prefer to not having to add another LED to the BOM.

No, there’s no option for control of the imp’s LED. It could cause user confusion so it’s for system use only.

We may be exposing the light sensor though, which you can use as a very low-grade ALS (enough to tell if lights are on or off in a room, generally).

How do you get the AMX code onto the iPad app?

Steve

@slibutti - you don’t.

The AMX code is loaded on to an AMX processor. The iPad is just an interface to the control system which talks to the cloud.

Which AMX Processor are you using in the example?

S

I was using an NI-2000, but that code will work on any NI processor.