We have been doing basic testing with encoders and Limelight, and it would be helpful to see some of the values we use in our code printed to Driver Station. As the title says, we are using Visual Studio and C++, and we want to see live information printed to FRC Driver Station. We understand that this code would likely be placed in robot periodic so it updates each frame, but we are unsure of what to write.
There’s a couple different options. You can print directly to console with std::cout
or wpi::outs()
, but a better option is to use SmartDashboard::PutNumber()
. The latter will send the information via NetworkTables to a dashboard application such as Shuffleboard on the driver station.
Thank you for your help! So assuming we wanted to print a variable called “value” we would use the line SmartDashboard::PutNumber(value); right?
You need to give it a name, so frc::SmartDashboard::PutNumber("value", value);
OK, thank you.
Where in Driver Station would this information be displayed?
It’s not displayed in the Driver Station application, it’s displayed in a dashboard application, e.g. the LabView dashboard, Shuffleboard, SmartDashboard.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.