Hi, i’m new to the competition and on the programming side, i’ve been tasked with adding a color indicator to the driver station but i’m not sure how, they have told me it’s done with network tables but i still don’t know how.
Any help would be aprecciated.
What colors does the indicator need to show? Is this just red/blue alliance indicator or full RGB spectrum?
I only need the red and blue alliance indicators
I assume this is to show the color of the ball right? Are you familiar at all with Shuffleboard?
No, i don’t know
Viewing data like that directly on the driver station is an outdated way to do it. Learn to use the SmartDashboard class in WPIlib. This will put data to visualization tools like Shuffleboard and Glass, which you can open by going ctrl-shift-p on Vscode and typing “Start Tool.”
After opening Shuffleboard or Glass, you’ll see a NetworkTable called “FMSInfo.” You’ll be able to click on that to get match info. You can also get this data in your robot code using the NetworkTables API.
In our experience, we’ve found that Glass is better for debugging while Shuffleboard is easier to read in the heat of a match, but it’s ultimately up to the preference of your programmers and your drive team. I hope that helps!
Thank you
If you want to know your alliance color in code, you need to do something like this:
if (DriverStation.getInstance().getAlliance() == DriverStation.Alliance.Blue)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.