I have an arm that has a rotational sensor on it. I don’t know how to make it so that the motor spins the arm to the exact position that the rotation sensor says. Its also in block code.
You can either use an if statement and just say: If rotation > some number then, stop spinning motor.
The problem with this is that your arm has inertia and so it will continue spinning past the place it stopped. The way you fix this is which a PID loop.
This video explains it really well. One side note is that you should not use the Integral term because it need to be really small for it to not explode to infinity.
1 Like
Also for PID, it will be pretty difficult to code it in block and the only one I know is the Caution Tape one linked here. I would suggest to do it on VSCode (Vex code v5 pro).