LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sweeping an LED color from Blue to Red

I want to have an LED that will display as sort of a visual temperature sensor of sorts....

I have various temps being read, and I want to smoothly run from blue ( room temp ) to red ( close to overtemp ) ... but I want to run through the whole spectrum, for the wow factor... and for coolness Smiley Very Happy

my delema is not how to change the LED color but how to smoothly and subtely make the transistions.

*COOL*        Blue -> blue-green -> green-blue -> green -> green-yellow -> yellow-green -> yellow ........   -> red    * HOT*

I was using the RGB to Color.vi  to experiment with how the colors respond to changes in the R G B values... I want to somehow link those RGB values to the temp scale, but it's not as simple as just a direct scale and wire... because blue -> green involves decreasing one, increasing another... all in certain scaling factors.

I hope I explained this well enough as to convey what I would like to do.... any thoughts? I think it would add extreme pimp factor to my program if I could get this to work... and would be used in various other programs too.  Smiley Very Happy

Message Edited by MJBrehm on 10-06-2006 11:05 AM

0 Kudos
Message 1 of 14
(7,330 Views)
A plain LED is a boolean. I has only two states, ON or OFF, thus only two colors. You can get complicated and change e.g. the ON color using property nodes.
 
A better way would be to use a color box indicator. You can even make it look like an LED.
 
For some examples, look at the links in my last post of this thread:
 
 
In your particular case, I would create a color ramp lookup array, then index into it based on a scaled value. 🙂
 
 

Message Edited by altenbach on 10-06-2006 09:11 AM

0 Kudos
Message 2 of 14
(7,324 Views)
Not an LED, but how about a gauge with the color ramp enabled?


Message 4 of 14
(7,309 Views)
Here's a color box example
Randall Pursley
Message 5 of 14
(7,298 Views)
Great... thanks for all the replies.. I'll have to hash through them....

be back in a bit!  Smiley Very Happy
0 Kudos
Message 6 of 14
(7,293 Views)
I saw a programable control that seems to fit your requirements.

Try the colour spot control at
http://members.lycos.co.uk/sgctek/

I think that you could put a surround around the control so that it will look like an LED



(I don't know if the above web graphic will show the same effect in the forum)
0 Kudos
Message 7 of 14
(7,280 Views)
Here's what I had in mind (LabVIEW 7.0).
 
 

Message Edited by altenbach on 10-06-2006 12:00 PM

Download All
Message 8 of 14
(7,270 Views)
Wow Altenbach,

you nailed it... wish there was an option for 6 stars... bravo!


Thanks for all the replies. great stuff.
0 Kudos
Message 9 of 14
(7,211 Views)
Actually, the color ramp was a bit flawed because it does not produce a full green in the center. Here's a slightly improved version using four ramp segments. Modify as needed. 😄
 
 
 

Message Edited by altenbach on 10-11-2006 09:28 AM

Message 10 of 14
(7,194 Views)