Confused on how to intergrate smartdashboard/shuffleboard for cpp

Hello again, I have another question. So I wanted to try to use programs like elastic for our driverstation over the basic one. But from my searching I couldn’t find a simple way to figure out how to use smart-dashboard/shuffleboard in the code specifically for c++. Could anyone give me some help on some things like what needs to be defined, etc. Or even if there is an easier way to use elastic in the code that I don’t know about. Any help would be much appreciated.

Are you asking about how to send values from the robot’s code (in C++) to the Smartdashboard? If so, look here: Displaying Expressions from a Robot Program — FIRST Robotics Competition documentation

1 Like

Yes! but also I am trying to figure out how to define/include smart dashboard and how to use its variables. Thank you!

I’m not sure what you mean by “define/include” here. But if you are asking about how to include the appropriate headers so that the SmartDashboard class is known to the compiler when it is compiling your class, I think you need to say this near the top of your file (although take this with a grain of salt since my team has always done Java on the robot):

#include <SmartDashboard\SmartDashboard.h>

When you say “use its variables”, are you asking about reading data that has been set on the SmartDashboard in the robot code? This is possible, but a bit less of a common use case, so I want to make sure I understand what you are asking. If so, take a look at “SnedsbleChooser”: Choosing an Autonomous Program — FIRST Robotics Competition documentation

That’s Perfect! Thank you so much for your help!