View Single Post
  #6   Spotlight this post!  
Unread 27-01-2014, 14:59
gixxy's Avatar
gixxy gixxy is offline
Programming and Arduino Mentor
AKA: Gustave Michel III
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Ruston, LA
Posts: 207
gixxy is on a distinguished road
Re: Talk to rpi from crio

Last year Team 3946 used a network Socket Connection to talk between the crio and rpi.

Basically we had a Socket Server running in Python on the RPI and a Socket Client in Java on the cRIO.

Here is the code we used:

Python Side:
PyGoalFinder

Java Side:

This is the code that actually ran the socket in a separate thread and parsed the data.
ThreadedPi.java

This is the Subsystem we used to Interface the system:
ThreadedberryPi.java
__________________
Programmer - A creature known for converting Caffeine into Code.
Studying Computer Science @ Louisiana Tech University
Associate Consultant @ Fenway Group

2012-13: 3946 - Head of Programming, Electrical and Web
2014 - 3468 - Programming Mentor
2015 - Present - Lurker