Putting networktable entrys to the smartdashboard


Were trying to put entries from the network table to the smart dashboard but we get the error

The method putNumber(String, double) in the type SmartDashboard is not applicable for the arguments (String, NetworkTableEntry)

here is the smart dashboard put we are using.

SmartDashboard.putNumber("Area", table.getEntry("Area,"));


I’m assuming that you’re trying to read off the table at key “Area,” and place that value in the SmartDashboard under key “Area”. If that is what you’re trying to do, then use entry.getDouble (defaultValue) to convert from NetworkTableEntry to double. If that’s not what you’re trying to do, could you explain what you’re aiming for so that we could better help you?


i don’t fully understand how the .getdouble() is used what am i supposed to put in the brackets and infront of it?


putNumber(String key, double value) expects a String key (in your case, "Area") and a double value, but you are passing in table.getEntry("Area,"), which is of type NetworkTableEntry. Instead, you can do SmartDashboard.putNumber("Area", table.getEntry("Area,").getDouble(0.0)); to put in the entry’s double value rather than the entry itself. The 0.0 here is the default value, meaning that if it cannot find a value for the entry "Area,", it will return 0.0 instead.


Thank you so much we tried this and it worked!