Rotation Sensor Catapult Reload not working properly

I am attempting to utilize the rotation sensor to pull down the catapult to its primed position automatically. The code works as intended when I start the program with the catapult, not in its primed position. However, if I start the code with the catapult in its primed position, it does not stop. I have both attached a video of the phenomenon happening and attached pictures of my code to this post.

code
Link

Instead of having it move the catapult back, try having it print the sensor’s value onto the screen, if I had to guess, the catapult starts lower than 0 so it sets it to being at a little under 360° instead of being a little under 0°

3 Likes

We ended up couting the values to console and yeah you were right the values were going below 0 degrees causing the sensor to input a value of 3600. Thank you so much for the help.

2 Likes