![]() |
How to use an RGB LED strip with a Vex Spike?
My team wants to put an RGB LED strip on the robot, and we have some Vex Spike relays to use (I've heard these would work, not sure). Our LED strip has a common anode, so one wire to take an input voltage, and then one wire for each cathode of the LEDs, so one wire for red, one for blue, and one for green. Our Vex Spikes have a Voltage in, ground, and PWM input, and then a M+ and M- output. How would I wire the LED strip with one (or a few) of these relays in order to control the light color? So far I've tjougjt of using one relay per LED cathode, but I'm not sure what to do with the remaining + wire. Any help would be greatly appreciated.
|
Re: How to use an RGB LED strip with a Vex Spike?
We just did this with two spikes, also with a common +12 and separate 0V lines.
We wired the red, green, blue, and black (common) to the four outputs of two spikes, then set the values to high or low as needed. If you do this, you will need not only to use kForward (+ is positive, - is negative) and kReverse (- terminal is positive, + is negative), but also kOn (both positive) and kOff (both negative). I'll post a truth table for this in a few minutes... |
Re: How to use an RGB LED strip with a Vex Spike?
Even better, here is our FunLights class (in Java) posted after this evening's build. We don't have the lights working properly, but we're pretty sure it's in how these methods are being called, not in this class.
It didn't get recorded in the code, but it looks like we wired
|
Re: How to use an RGB LED strip with a Vex Spike?
So by "red" do you mean the red (positive) wire, or the wire for the red LED? Our 4 pins are labeled +, B, R, and G.
|
Re: How to use an RGB LED strip with a Vex Spike?
Quote:
|
Re: How to use an RGB LED strip with a Vex Spike?
Quote:
|
Re: How to use an RGB LED strip with a Vex Spike?
That makes sense, thank you. I've always just associated black with ground, so I was a bit confused at that. Thanks for the help, this is exactly what I was looking for.
|
| All times are GMT -5. The time now is 11:32. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi