View Single Post
  #2   Spotlight this post!  
Unread 11-01-2017, 22:00
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 398
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: Network Tables: Please explain like I'm 5

I can explain how to use it, if that's what you want.

1. Clone https://github.com/wpilibsuite/ntcore
2.
Code:
./gradlew :native:build -PskipArm
3. Find built desktop NetworkTables JAR (<place you cloned>/native/build/libs)
4. Use JARs in project
Code:
NetworkTable.setClientMode();
NetworkTable.setNetworkIdentity("Name of my coprocessor or DS or whatever");
NetworkTable.setTeamNumber(5401);
NetworkTable.initialize();

// now get the network table that corresponds to the SmartDashboard class of WPILib
NetworkTable smartDash = NetworkTable.getTable("SmartDashboard");

// now use table to put data
smartDash.putNumber("VisionAngle", 42.0);
For the pi, you'll need to download a pi toolchain
Then,
Code:
./gradlew :arm:build -PcompilerPrefix="C:\Path\To\RPi\Toolchain\bin\arm-linux-gnueabihf-"
Find build probably in <place you cloned>/arm/build/libs
Use JARs in code on Pi as above
__________________
Creator of SmartDashboard.js, an extensible nodejs/webkit replacement for SmartDashboard


https://ligerbots.org
Reply With Quote