My team is using a catapult for this years spin up game, and we use a limit switch to stop the cata. We can’t figure out why the limit switch works during the driver control and the driver skills program, but when we switch to the autonomous programs the limit switch doesn’t work. Is there something different we have to do? We are lost.
post your code, we can’t help without it.
5 Likes
So your code is doing what you’re telling it to.
When the code starts autonomous, it enters the while loop. It checks to see if the limit switch is pressing. Since the limit switch is probably not pressing, it exits the while loop and moves on to the rest of the autonomous.
The solution you want is a control task for your catapult that runs in the background of your code. Search “vexcode tasks” on here if you are unfamiliar.
This code probably won’t be very successful in driver control either. You’ll want a task that runs during driver as well.
1 Like
Here you go ^, please let me know what we can do to fix it.
Would you consider reading the post I just made?
1 Like