Setting Variable from SmartDashboard or Driver Station

When testing shooters my team was hoping to use either SmartDashboard or the FRC Driver Station to set variables. We were hoping to be able to simply click and type a variable and change the speed of motors for testing purposes. How simple and how would we go about doing this?

Thank you for any help provided.

The variable has to be defined in code and sent to network tables before you can edit it on the smartdashboard.

For more information, refer to the docs here https://wpilib.screenstepslive.com/s/4485/m/26401

If you enable test mode with the SmartDashboard open, you should see subsystems and their components in the LiveWindow (assuming you’re using robotbuilder). Otherwise you can call LiveWindow.addSpeedController(shooterMotor) or something along those lines