We are trying to use this package for our differential drive robot. The left encoder is returning negative values, however when we modify the encoder_driver.ino with "0-left_enc_pos;" the left motor recieves 255 PWM singnal.
long readEncoder(int i)
{
if (i == LEFT) return 0-left_enc_pos;
else (i == RIGHT) return right_enc_pos;
}
It fixes the encoder values, but it affects somthing else. Same thing happens if we change the encoder wires.
We are trying to use this package for our differential drive robot. The left encoder is returning negative values, however when we modify the encoder_driver.ino with "0-left_enc_pos;" the left motor recieves 255 PWM singnal.
It fixes the encoder values, but it affects somthing else. Same thing happens if we change the encoder wires.
Any tips on how to fix this?