View Single Post
  #6   Spotlight this post!  
Unread 18-01-2016, 12:46
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 330
fovea1959 will become famous soon enough
Re: Easy communication between Raspberry Pi and roboRIO

We had a Python scripts on the raspberry pi sending UDP packets to the roborio; we encoded the data as JSON. If you install Avahi on the rPi, then you can do the IP address lookups by name (both ways).

If you look in our code drop, you can see the roboRIO/Java end of things (reads the UDP packets, decodes the JSON, and puts the result in a global for the rest of the code to act on): http://www.chiefdelphi.com/media/papers/3189.

We didn't get around to publishing the Raspberry Pi end of things, so I don't know about the legality of sharing the code post-kickoff, but the libraries to make up a JSON string and do UDP sends are part of Python, and Google will help there.