
15-02-2013, 19:53
|
|
Registered User
 FRC #0269
|
|
Join Date: Jan 2013
Location: Oconomowoc
Posts: 32
|
|
|
Re: Programming RGB lighting
Quote:
Originally Posted by artdutra04
To actually control the color of these LEDs, you will have to manually generate the duty cycle for each color in your code using the generic duty cycle (0-100%) functionality to three output pins on the Digital Sidecar (one for each primary color). In essencse, you replace the giant control box on these LED light strips with the FRC control system, and wire directly into the four wires going into the LED light strip.
In addition, the signal pins on the DSC will likely not be able to provide enough current for lighting bright LEDs; in this case you have to use a signal amplifier, such as a homebrew solution using transistors and other discrete components or a COTS solution such as s solid-state relay. Mechanical relays (such as a Spike) will likely not be able to switch fast enough.
Edit:
To actually pink which color you want to generate, look up HTML hexadecimal color charts. Hexadecimal is a base-16 number system, where 0-9 are the same, but A=10, B=11, and so on until F=15. So for example, FF in hexadecimal would be 255. The sequence is 2 digit red, 2 digit green, 2 digit blue, so the hexadecimal color #FF6600 is 255 (out of 255) red, 102 (out of 255) green, and 0 blue.
To convert these three numbers to a generic duty cycle, divide by the large possible number (255). So it becomes
Red: 100%
Green: 40%
Blue: 0%
Which will generate the color orange.
|
For the pwm which color goes where in the PWM(the red, green, and blue wire)? and where does the common wire go(the black wire)?
|