View Single Post
  #2   Spotlight this post!  
Unread 07-01-2015, 18:14
VeqIR's Avatar
VeqIR VeqIR is offline
Registered User
AKA: Dave
FRC #4488 (ShockWave)
Team Role: Mentor
 
Join Date: Mar 2014
Rookie Year: 2005
Location: Hillsboro, OR
Posts: 29
VeqIR is on a distinguished road
Re: Help with RGB Lighting on Robot

This will depend entirely on which kind of RGB LEDs you choose. In the simplest form, an RGB LED is just a 4 terminal device (R, G, B and common/power). If you wish to control one LED, you'd need 3 digital I/Os.

I assume you want to do something more interesting, like use an individually-addressable RGB strip. This allows you to control the color of each pixel independently and you can do some cool stuff. We used these on our robot last year and they work pretty great:

https://learn.adafruit.com/adafruit-...guide/overview

The downside is that they require an Arduino to control the lights since they use a special PWM-style 1-wire interace with tight timing requirements. We used 4 digital I/Os from the cRIO to signal the Arduino when robot functions happened and then the Arduino code adjusted the light pattern it displayed to the light strips.

However, Adafruit recently released some nifty new strips that can be configured using SPI (an interface you have on your RoboRIO).

http://www.adafruit.com/products/2240

The complication here is that you'd need to program your own control code to display something interesting to your lights that will share processing time with your robot functions.

I'd recommend the Arduino-controlled approach since it greatly simplifies the firmware development effort since they are tons of examples online on how to program these strips.