Skip to content

Communication with the RoboRIO

Riyadth Al-Kazily edited this page Feb 12, 2018 · 3 revisions

How can the Arduino get instructions from the RoboRIO

This page needs a bunch of detail, but here are some topics we can fill in

Digital I/O from RoboRIO to Arduino

We did this on our 2017 robot (Helios) to allow the RoboRIO to change the Bling colors when the driver set the robot in "reverse" mode (where the controls operated backwards). It helped the driver know which way the robot should be moving by looking at it, and reduced mistakes due to the robot being in the wrong mode.

The technique is to set a special Digital I/O (DIO) pin on the RobotRIO as an output, and connect that to one of the Arduino digital pins as an input. The RoboRIO can set the pin as a high or low output, and the Arduino reads the pin as a 1 or 0 input. It can then choose different paths through the Bling code in response.

This is the easiest way to establish communications between the RoboRIO and the Arduino, but is also the most limited, as it only sends one bit of information (true or false). Multiple DIO pins could be connected to increase the number of "messages", but for anything more than a few "modes" this would become difficult to build and maintain.

I2C messaging from RoboRIO to Arduino

I2C is a serial message bus, which allows bytes of data to be sent in both directions. It uses two signal wires (a clock and a data signal), and requires a common ground connection between the devices. The RoboRIO controls the communications, and sends messages to the Arduino. Likewise, the RoboRIO can ask for responses (which could be useful if the Arduino has any sensors attached to it).

Links to useful information:

RS-232 serial messaging from RoboRIO to Arduino

RS-232 is an asynchronous, point-to-point serial communication link. That means that the data is sent across the wires serially (like the I2C), but since it is asynchronous it does not require a separate clock line. Each wire carries data in one direction only, so there is one wire for messages from the RoboRIO to the Arduino, and another wire for messages coming back.

The Arduino is not electrically compatible with the RoboRIO RS-232 port, so some adapter hardware is needed in order to reduce the voltages used by the RoboRIO.

Links to useful information:

Ethernet connection

Most Arduino boards do not have a built-in Ethernet connection, but there are some add-on boards to provide the functionality. This can be a good way of connecting devices together (especially since the RoboRIO already uses Ethernet to communicate to the radio). Adding Ethernet to the Bling Arduino would allow it to be directly controlled from the driver station, which could be another added bonus.

This is probably the most complex way to send messages into a "bling" controller, but someday we should try it out.

Clone this wiki locally