You can plug the Arduino directly into the Rio as you would if you were hooking the Arduino to a computer for programming and use a Serial connection between the two devices. WPILib has a constant
SerialPort.Port.kUSB for a serial device connected via the Rio’s USB port. Here’s what we’re using this year:
SerialPort arduino = new SerialPort(9600, SerialPort.Port.kUSB);
String response = arduino.readString();
On the Arduino side, check out the Read example which reads Serial data into your program. If you’re using a compatible board, you can also use the SerialEvent method which may be beneficial in some programs.