Hello Everyone,
I could have swore I saw a post similar to this earlier, however, I cannot seem to find it. Anyway, a little refresher never hurt anyone. My question is: how do I implement a way to switch between a few different autonomous commands in command-based using a smartdashboard button. Ideally, I would like to be able to place our robot in three different spots and then have the driver push one of the three corresponding buttons on the smartdashboard and have it execute that specific command. Sorry if that was unclear. Thanks in advance for the help.
SmartDashboard.putData(yourCommand)
Take a look at this page in the documentation. It has an example of exactly what you’re looking for:
Brad
Thanks that is exactly what I need. However, the SmartDashboard is not updating whenever I do anything with java code. Any SmartDashboard.putData method seems to do nothing or SmartDashboard.(anything). Any thoughts as to why that is happening? Probably a simple fix but I am new to smart dashboard.
Nevermind I fixed the problem
Are you seeing anything on the SmartDashboard? One thing to check is that the IP address is properly configured. You should make sure that your team number is in the preferences (File, then Preferences). That determines the IP address.
I just added this article that might help debug any SmartDashboard connection issues.
http://wpilib.screenstepslive.com/s/3120/m/7932/l/95591-verifying-that-the-smartdashboard-is-working
Good luck
Brad
What was wrong?
Not 100% sure, I just made a brand new project and started from scratch. However, what may have happened is that in one of my subsystems, I may have forgotten to set the default command otherwise, I am fairly confident everything else was right. Thanks for all of your help today. I was able to get a lot done from a software aspect.