Using rPi & Network Tables

Greetings:
I would normally take a little more time to try to figure this out myself but the Stop Build day is looming and our team’s to-do list is ponderous.
I have read over all of the posts on this subject but I still haven’t quite seen what I need. We have a simple vision processing procedure using opencv library on an rPi-III. It is written in C++. The VP procedures produce 2 values that we need to get over to the RoboRio (Java).

Forgive my naivete but I had thought this would be a “simple” matter of:

On rPi side:

  1. Obtain a pointer or handle to the network table
  2. Inserting the 2 addition “key-value” pair definitions.
  3. when data is ready, call some procedure that provides the desired key and writes the required value to that key.

Then on the RoboRio side:

  1. Also obtain some handle or reference to the network table
  2. Knowing the key strings, call a procedure that specifies the string and recovers its current value.

How badly am I off?

Does there exist and C++ example code for the rPi side? Likewise, some Java example code for the RoboRio side?
Any help would be greatly appreciated.
Mark

Take a look at the FRCVision rPi image and documentation. The image comes with C++, Java, and Python example programs (source for C++ is here). The examples don’t write NetworkTables, but you can find some NetworkTable examples of reading and writing values in C++ and Java here.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.