VMLAB users forum
General discussion boards >> Contributors /  User-defined Components Repository >> RGB color panel/LED

Message started by justinlove on 12/04/09 at 20:56:05

Title: RGB color panel/LED
Post by justinlove on 12/04/09 at 20:56:05

Attempts to turn 3 PWM signals into a color value.  Color is a little shaky since it's trying to provide immediate feedback in a slow simulation environment.

There are actually two components; a single panel, and an 8x to conserve console space.

;Xxcolor0 _colorpanel xl0 xl1 xl2

Xcolor0 _colorpanel8(1)
+ xl0 xl1 xl2 xl3 xl4 xl5 xl6 xl7
+ xl8 xl9 xl10 xl11 xl12 xl13 xl14 xl15
+ xl16 xl17 xl18 xl19 xl20 xl21 xl22 xl23

Title: Re: RGB color panel/LED
Post by DreamCat on 12/09/09 at 10:53:55

thanks a lot!

but hope you can give a example, i don't know how to use it..

Title: Re: RGB color panel/LED
Post by justinlove on 12/09/09 at 20:03:00

I actually had to refresh my memory. ;^)

It looks like the single panel is active-low, whereas the 8x has an active level parameter.

They operate on PWM or pulse-width modulation.  If the signal is active 50% of the time, you will get 50% of that color (red, green, or blue), and so on.

I was targeting 60 frames per second.  While it mostly just cares about on/off ratios, there is a timeout to detect solid-on or solid-off signals.  This timeout is currently compiled in.

I set up a project file fragment that runs one with just interface components.  It's currently set up to use keys 0,1,2 for RGB, allowing you to make very basic colors.  There are also some short NRZ generators on keys 4,5,6 with some pulse ratios, which could be wired up.

K0 VDD k0 latched
R0 k0 r0 1k
K1 VDD k1 latched
R1 k1 g0 1k
K2 VDD k2 latched
R2 k2 b0 1k

P25 NRZ(8m) nrz25 KEY_4 "0111011101110111011101110111011101110111011101110111"
;R25 nrz25 r0 1k
P50 NRZ(16m) nrz50 KEY_5 "01010101010101010101"
;R50 nrz50 g0 1k
P75 NRZ(8m) nrz75 KEY_6 "0001000100010001000100010001000100010001000100010001"
;R75 nrz75 b0 1k

R100 r0 GND 10k
R101 g0 GND 10k
R102 b0 GND 10k

Xcolor _colorpanel r0 g0 b0

.PLOT V(r0) V(g0) V(b0)

Title: Re: RGB color panel/LED
Post by Unknow on 05/29/12 at 07:50:56

I have a living solution, ipod dock and when its on it has a blue LED light. I like the light it gives off, and i want to know how long before the LED light dies. I keep the dock on every night for like 9 hours. Can someone please help me??
LED Fluorescent
LED Par Light
LED Flood Lamp

VMLAB users forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.