View Single Post
  #14   Spotlight this post!  
Unread 16-02-2013, 09:53
CooneyTech CooneyTech is offline
Registered User
FRC #0269
 
Join Date: Jan 2013
Location: Oconomowoc
Posts: 32
CooneyTech is an unknown quantity at this point
Re: Programming RGB lighting

Quote:
Originally Posted by artdutra04 View Post
You will have to put each color onto a separate PWM output channel. Each color needs to be pulsed at a different frequency to generate different colors. The reason you have to pulse the wires to generate different colors is because the digital circuit only goes on or off, there is no in between value. So if you pulse on and off really quickly, you create the "average color" that is seen by the human eye. To achieve this, you should pulse at least 60 times per second, ideally at least 100, to make the colors look smooth.

For the remaining black wire, the wiring diagrams in the link above seem to have some units with this labeled positive, some are not labeled at all. Depending on whether the remaining wire is positive or negative will affect how you need to wire not only this wire, but also the signal amplifiers for the RGB lines.

But... check the control box that comes with these LED lights. See if there are any additional ports on this unit, such as a serial/UART, I2C, SPI, etc. Sometimes these RGB LED light sets have additional input ports, to allow an external controller to communicate directly to the unit to command it what to do. If this is the case, then it becomes simpler to implement it.
So for the pulsing how do I choose a color? Is it just the rate at which I pulse that particular color? I see what you mean be by on or off through my DIO blocks. I also understand hexadecimal through my web design class so that no issue for me.

Last edited by CooneyTech : 16-02-2013 at 09:55.
Reply With Quote