No matter what I try, I can’t get our pi coprocessor to connect its network tables to the roborio’s server. My console output at http://wpilibpi.local/ says NT: client: CONNECTED to server 10.59.80.2 port 1735, but the network table values in SmartDashboard won’t change. If someone could point me in the right direction, any help is appreciated.
My pi code (the y value just increases forever so I know something’s connected): Main.java (3.1 KB)
My roborio code: public static double centerX = 0.0; NetworkTableEntry xEntry; NetworkTableEntry yEntry; public static NetworkTable table = NetworkTableInstance.getDefault().getTable("datatable");
Shot in the dark here… can you confirm that the IP provided in that log statement belongs to your roborio AND that the NT server that smartdashboard is connected to is the same? Essentially, I’m questioning whether you somehow have multiple NT servers on the network so you’re writing to one and reading from another.
Other than that, the code seems fine to me. At least, I don’t see anything glaringly obvious.
SmartDashboard only shows stuff in the SmartDashboard table. If you want to see stuff in the datatable table, you’ll need to use OutlineViewer, Shuffleboard, or Glass.
I’m not sure if the startClient methods stop any previous clients but that method will try to find an ip from a driver station running on localhost, which obviously won’t work on a pi.
You shouldn’t need that line anyway since you’ve already started a client based on your team number
That line does no harm. It just adds looking for a local DS to a client. If the Pi says CONNECTED that means it’s successfully connected to the RoboRIO NT server.
Using the viewer is a good way to split things apart between the writer and the reader, and it lets you confirm the addressing info and key/path name(s). The answer is probably in a prior response, but this is a good tool, in general.