LEDs on the REV RIODuino

Hi Everyone,

I have a question in regards to programming the LEDs on a REV RIODuino. Would it be possible to program the micro-controller board to light LED’s by response of a Joystick Command (like pulling the trigger)? Or would it be more practical to lets say have the LEDs function through particular commands on the robot? The goal of this is to have LED’s as a mechanism to not only look pretty, but to help human players know when to load a tote into the robot (Green being ready, red being not ready ). Thank you for any help!

Hey Asymons,

Both scenarios are quite practical.

First you should set up a way to communicate between the roboRIO and the RIOduino. There are many options, but I2C and Serial (UART) connections are already made between the two when the RIOduino is plugged into the MXP.

You’ll then write code on your RIOduino that responds to commands or signals from your roboRIO.

Those commands can be simple: when the RIOduino gets the “red” command, it changes the LEDs to red, when it gets “off” it turns them off, etc.

They can also be more complex: the roboRIO sends the current robot state, and the RIOduino decides what to do.

The code on the roboRIO will need to take input (joystick values, sensor values, and/or robot state) and decide what command to send to the RIOduino.

AndyMark published an example using the RIOduino with a touch screen shield. Look at the “Files & Documents” tab on the RIOduino with 2.8" Touchscreen (am-2999) bundle page.

Take a look at that example to see how they communicate between the roboRIO and the RIOduino. With some modification, you can send commands to your RIOduino LED code rather than the RIOduino touch screen code.

-David