Hello,
I hope this post finds you well. I’m working on a project involving two 15:1 Micro Metal Gearmotor HPCB 6V with 12 CPR Encoder, Side Connector, and use the DRV8833 motor driver. I’m programming this with a Waveshare Zero ESP32. I have some simple code that spin the motors “forward”:
void straight(char direction){
moveLeftMotor(100);
moveRightMotor(100);
while(1){
Serial.printf("%d\t%d\n",encLeft.read(),-encRight.read());
// delay(100);
}
}
The move function works as intended, spinning the motors correctly. The issue lies where the encoders will start to increase in value but decrease, despite moving in the same direction. What’s more peculiar, the encoders work perfectly when I rotate them by hand. What are potential causes of this issues, and what recommendations would you all make? Thank you for your time, and I look forward to a response. Cheers!