For example, during the competition is there a way to program the robot to know when you’re on the red or blue team? We want to have LEDs on the robot that changes to blue when we’re on blue team and red when we’re on red team. Also, we would like to have it on the shuffleboard to show that when we’re on the blue team, something changes to blue, and red if we’re on red team. We couldn’t find code like this anywhere, especially code to know what team color you’re on.
1 Like
Check the FMS libraries. There should be a function in there to get your alliance color automatically.
You can use DriverStation.getInstance().getAlliance();
.
1 Like
Without the period right?
yes
1 Like
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.