LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sweeping an LED color from Blue to Red

Nice examples Christian!

Here is yet another way to ramp any color to any color.

Ben

Note: If you want additonal collors in between the extremes just include then in the array and adjust you fractional index accordingly.

Message Edited by Ben on 10-11-2006 11:46 AM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 11 of 14
(1,899 Views)
Ultimately, it does ot really matter how you calculate the color ramp mathematically. Once you are satisfied with the ramp, you would run my VI once, right-click on the color ramp terminal and select "Change to constant". Now delete all code to the left of it. 😉
 
Nice, compact, fast, and readable code. 😉
 
BTW: Open your example browser and look for the example named "Create IntGraph Color Table.vi". It has a nice subVI that lets you define a color table interactvely. The code feels a bit stale though ;))
 
(Ben, you know that I am a sucker for blue wires and integer math. While your solution is very elegant, I object to the orange wires and coercions. It goes from U32->U8_>DBL->U8->U32. 🐵
 
 
Message 12 of 14
(1,871 Views)
I love the linear graph representation Altenbach... it took me a second to figure out what it represented... but it puts the details of all those build arrays into perspective...

thanks a ton guys Smiley Very Happy  

I posted links to this thread as comments in my code... in case someone down the road is interested.


EDIT:  Possibilities are endless on where this could be used!!... I get excited just thinking about it.... im such a sucker for the little things. Smiley Tongue Smiley Very Happy

Message Edited by MJBrehm on 10-11-2006 01:37 PM

0 Kudos
Message 13 of 14
(1,860 Views)

Christian wrote;

"

(Ben, you know that I am a sucker for blue wires and integer math. While your solution is very elegant, I object to the orange wires and coercions. It goes from U32->U8_>DBL->U8->U32. )
 
"
 
Christian you are true to form. Bonus points to you for staying in character! Smiley Very Happy
 
Yes, in LV 8.20 I suspect that VI opened and looked like it was bleeding. Let me know if you can find a color (T is not a color) that break that code. Smiley Wink
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 14 of 14
(1,844 Views)