Publishing Robot Data

WPILib provides different ways to send out the values of data in the robot while it is operating. One of the simplest methods is to print text that can be read on a console or the driver station. We could just use the standard Java System.out.println() function to print information to the console, but there are better ways that allow us to see the information on the drive station and in data logs.

For data is rapidly changing, printing text is not the best way to monitor the values. WPILib provides the NetworkTable class which allows publishing data on the network such that other software can read those values for display or storage. There are multiple ways to use the NetworkTable functionality, and some provide a simpler interface to avoid some of the details.

References:
WPILib Displaying data from Your Robot
https://docs.wpilib.org/en/stable/docs/software/dashboards/shuffleboard/getting-started/shuffleboard-displaying-data.html

WPILib NetworkTables
https://docs.wpilib.org/en/stable/docs/software/networktables/networktables-intro.html#what-is-networktables

WPILib Writing Your Own Sendable Classes
https://docs.wpilib.org/en/stable/docs/software/telemetry/writing-sendable-classes.html