My team is looking into using SmartDashboard to actively change some values on our robot. However, I am unsure on how to do so. Would i be using the .getNumber method, and does .getNumber(“key”,) change if i change the value on SmartDashboard?
Yes, that’s exactly correct. The second parameter you pass to getNumber is the default value, e.g. the value you get if you never set a number on SmartDashboard or in your code.
but if i do change that value, it will change in the variable i passed in as well?
No. It’s used like:
double x = SmartDashboard.getNumber("x", defaultValueToUseIfXIsNotSet);
2 Likes
Ok, i got it now, that’s probably where i was going wrong.
Awesome, thanks for the help!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.