|
Re: [FTC]: DC MotorEncoder Code
Here's one way to do it:
Have the motor move back until it hits a touch sensor. Set the input from the encoder as the zero position (store it in a variable) and move the motor forward to the encoder position you want, plus the zero value.
We did this to align a dispenser tread on our old robot. If it doesn't rotate all the way around, you may not have to do this.
|