I can send PWM signal to the motor and it responds well I am trying to read the encoder value using e but it always shows "0 0"
I modified motor_driver.h according to where my encoder PINs are connected I am using Arduino mega interrupt PINS PIN2,PIN3 AND PIN20,PIN21 for the left and right encoder
/* *************************************************************
Encoder driver function definitions - by James Nugen
************************************************************ */
#ifdef ARDUINO_ENC_COUNTER
//below can be changed, but should be PORTD pins;
//otherwise additional changes in the code are required
#define LEFT_ENC_PIN_A 20
#define LEFT_ENC_PIN_B 21
//below can be changed, but should be PORTC pins
#define RIGHT_ENC_PIN_A 2
#define RIGHT_ENC_PIN_B 3
#endif
long readEncoder(int i);
void resetEncoder(int i);
void resetEncoders();
I can send
PWM
signal to the motor and it responds well I am trying to read the encoder value usinge
but it always shows"0 0"
I modifiedmotor_driver.h
according to where my encoder PINs are connected I am using Arduino mega interrupt PINSPIN2,PIN3
ANDPIN20,PIN21
for the left and right encoder