We are trying to put an led strip on our off season t shirt canon and I was wondering if we could somehow use a Vex Spike to wired to the led’s and the PWM input on the Rio to enable the led’s whenever we fire the canon? Is this feasible, or should we just use an Arduino?
Spikes don’t do anything related to PWM. They use the same three-pin connector, but the signals on it are ground, forward, and reverse*, rather than ground, power, and PWM. That’s why the RoboRIO has separate relay outputs. If you’re asking if you can use a Spike to turn an LED strip on and off relatively slowly-- on for half a second when you fire the cannon, then off, for example-- then yes, you can.
*Technically, the two inputs control the two sides of an H-bridge, but it’s most commonly used to implement forward and reverse.
When you do this be careful that your on off time or pulse length is not super short and repetitive because that is bad for the spike and can burn out the relay.
I see, so we have to use the relay ports and the relay java class to turn them on and off?
yes the relay ports are where you would need to plug them into and I think the java class would be right but I have no idea (i mainly do electrical so I have no real Idea about the programing)
You can absolultely do this as we did it on our robot this year to add some visual aides for the driver. If I remember correctly you can only do 2 colors even if you have RGB becuase of limitations of the spike.
I can take a pic of how it was wired and post it so you know how it was wired. We dont meet for a week so it will take some time
You definitely can, I’ve done this a number of times on various robots (though as others have noted, with the “Relay” port, rather than PWM).
We basically just got an RGB LED strip off Amazon and used the Spike to toggle power to the IR-receiver/controller that came with them. If you want to change colors you can use the included remote, otherwise the Spike will toggle them on and off (and they generally remember their last color/mode setting too). Most of the generic RGB LED controllers also use a barrel connector to power them that just so happens to be identical to the ones used to power FRC radios, making it really easy to wire them to the robot.
That is correct unless you want to use multiple spikes and some weird wiring but at that point you might as well buy a can bus controlled one that works as a single unit