This is an archive of G2M. Please refer to this post for more information. Archived on 2026-01-09.

Rotation Sensor Catapult Reload not working properly

tdang1
04/02/2023 at 09:30:31 AM PDT

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.


Link

7996B
04/02/2023 at 05:47:49 PM PDT

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°

tdang1
04/02/2023 at 11:07:49 PM PDT

Replying to 7996B ↩️

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.