NetworkTable Problem

I am trying to putString to a NetworkTable and or the SmartDashBoard but every time I run the code it doesn’t display anything to the SmartDashBoard. Any suggestions on how to make this work so we can see the tables on the SmartDashBoard?

Here is my code

public class Robot extends IterativeRobot {

	public static final ExampleSubsystem exampleSubsystem = new ExampleSubsystem();
	public static OI oi;
	NetworkTable contourReport;
    
    public Robot()
    {
    	contourReport = NetworkTable.getTable("GRIP/myContoursReport");
    }
    
    public void testPeriodic() {
        LiveWindow.run();
        SmartDashboard.putString("Hello", "World");
        contourReport.putString("Hello", "World");
    }
    
    public void testInit()
    {
    	
    }
}

IIRC the name has to be “SmartDashboard”, not a custom name.

Try putting the SmartDashboard.putString() into teleopPeriodic() instead. When you run the robot in test() mode (which is what testPeriodic() is for), the SmartDashboard shows a different display…the LiveWindow display. For more on that, see here. Again, try putting a simple call to SmartDashboard in teleopPeriodic() and I think that you will be fine.

Also, we use SmartDashboard method calls without the NetworkTable code that you have and it works. I believe that the SmartDashboard method actually uses the NetworkTable to send the info across (it puts it into a SmartDashboard-specific data table, I believe…I’m not sure and should go look that up now).

The 2016 GRIP example here clearly uses a different name.

Are you simply suggesting that SD may only see the “SmartDashboard” part of the network table and that the data may actually be there?

Yes. But I’m only pretty sure.