Another freeze tag question here. Our code lets us get ‘frozen’ 5 times, and after we’re eliminated. Im looking for a way to disable the bumper so when we’re frozen and controller is disabled so we cannot move, someone can just keep hitting the bumper and eliminating them.
This is just an idea, and I’m not sure exactly how you could implement it (there are probably multiple ways).
You can try creating a Boolean variable called “Frozen” (for example) and make it read as TRUE for the time the robot is frozen after the bumper gets pressed. I think that could be a good tool for achieving what you’re looking for.
You could try setting the velocity of the drivetrain to zero. This would most likely disable the controller. This could also be undone with the click of a button by setting the velocity back to 100% or whatever you are using currently.
On the same button press, you could unfreeze the robot if it’s currently frozen and reset the freeze counter. You could use a brain button so it’s not accessible to competitors on the controller. Simple reset system.
If you are going to restart the code for the next round you could make life simpler and use the stop project to close the project when they are eliminated. You don’t have to close the code before you open it.
Hope this helps.