How to get a V5 smart motor to work as a servos (servos are illegal

I wanted to find out how make a v5 smart motor work as a servos with a triple shot function

What do you want the motor to do? The smart motor already let you control it like a servo, that is what VEX implies by calling it “smart”.

7 Likes

You can set it to move by a certain amount of degrees or rotations if that is what you are looking for?

if you want it to be like a servo in that it knows its position even after being powered off, and can only move a certain amount of degrees, you can attach a potentiometer to the front of the motor. However, i don’t see how that would be beneficial because of what @7686B_Ian and @tabor473 said, the motors are already smart motors, so they can see their position.

2 Likes

I want it to stay at a set position and when a button X is pressed I want it to flick forward and go back to its set position with no wait time

then have it spin forward for a set amount of degrees, then have it go back the same amount of degrees
like so
image
if you want to copy this here’s the code in plaintext

Motor.setVelocity(80, percent);
Motor.spinFor(forward, 360, degrees);
Motor.setVelocity(40, percent);
Motor.spinFor(reverse, 360, degrees);

just put this inside the button code in your driver control section (if you use comp template or made your own) and you’re set.
image

3 Likes

Change the braking mode on the motor to “hold”, this will make the motor stay in one place.

1 Like