If you just want a few feet of LED in a single color, the quickest solution is to go to the nearest auto parts store and buy some LED strips (or other lighting solutions) in the detailing area. They're also made to run off of not-particularly-stable 12V, so automotive electrical devices are often great for FRC - as long as they don't violate an FRC rule, such as connecting 0V to the chassis. You then connect the red wire to M+ on a spike, the black wire to M-, and use kForward to turn the strip on, any other state is off.
If you want more, and/or a bit of programmability, the next step up is to get some of the long (1 meter or 5 meter) strips from SparkFun or another vendor preferably of the RGB variety. Googling
12V RGB LED strip leads to lots of people who want to sell these to you. These strips come in two main varieties - addressable and non-addressable. Non-addressable strips work just like the ones above, but they have four wires - one common (sometimes common anode (+), and sometimes common cathode (-)). Connect these to the output of four spikes, and different state combinations can give you black (off), red, green, blue, yellow, cyan, magenta, and white.
If you have common anode RGBs and code in java, you can use our
Funlights.java as-is. Wiring is:
- Relay R2 control wires from relay port 2
- Relay R3 control wires from relay port 3
- Common anode (possibly labeled +12V) to R2 M-
- Red cathode (possibly labeled R) to R3 M+
- Green cathode (possibly labeled G) to R3 M-
- Blue cathode (possibly labeled B) to R2 M+
Addressable lights are also available, but you probably won't want to tie up the needed time and other resources of the RoboRIO to do this - see a few posts up for some leads on how to wire and program these.