Log in

View Full Version : RIO Communications API


raystubbs
19-07-2015, 21:59
I started writing a communications API to communicate with the RoboRIO. This is an attempt to separate the communications code from RoboDS, but it can be used for any custom driverstation projects you want. The library is written in Java but can be ported pretty easily to other languages.

Just note that though the API is complete and should be functional, it has not been tested at all on a real RIO device, it has only been tested with my loopback interface. The API only supports the new 2015 version of the communications protocol, but I hope others can expand it to work with the earlier protocol.

Here is the repo, it is in the form of an eclipse project so you should be able to download it and import it directly into eclipse: https://github.com/raystubbs/RioComAPI

M3rcuriel
21-07-2015, 15:03
I'm certainly interested!

If you have loopback test code that you can quickly rework for a real RoboRIO, I can test it as soon as you send it. If not, I'll probably work on building something myself for testing, because I've been hoping for an API like this for a while. Thank you!

raystubbs
21-07-2015, 21:48
I'm certainly interested!

If you have loopback test code that you can quickly rework for a real RoboRIO, I can test it as soon as you send it. If not, I'll probably work on building something myself for testing, because I've been hoping for an API like this for a while. Thank you!

I updated the github repo, the Main.class contains a test program, all you should need to do is change the IP from the loopback 127.0.0.1 to whatever IP your RIO is using. The program is simple, and uses the keyboard to simulate a joystick. It is mapped thus:


Numbers 0, 1, 2, 3, 4 --->Buttons 0, 1, 2, 3, 4
Arrows u, d, l , r -------->Axis' 1(y):127, 1(y):-127, 0(x):127, 0(x):-127
Space------------------>Enable/Disable


If you find any problems I'd appreciate it if you could help me out in finding their source since as previously stated I do not have access to a Rio.