Hi,
I just bought your wheels encoders (for dual shafts motors), i download the PololuWheelEncoders library but nothing …
The motor turn well, i measure an 1kHz frequency with a multimeter on pin OUT A but i have always the same result with encoders_get_counts_and_reset_m1() function : 0.
Here is my code (running on an arduino mini pro) :
[code]#define MOTOR_L_DIR 8
#define MOTOR_R_DIR 9
#define MOTOR_L_SPEED 10
#define MOTOR_R_SPEED 11
void setup() {
uint8_t i;
for(i = 8; i < 12; i++) {
pinMode(i, OUTPUT);
}
encoders_init(2,3,4,12);
Serial.begin(57600);
}
void loop() {
uint8_t i;
digitalWrite(MOTOR_L_DIR, LOW);
digitalWrite(MOTOR_R_DIR, LOW);
analogWrite(MOTOR_L_SPEED,110);
analogWrite(MOTOR_R_SPEED,110);
Serial.print(encoders_get_counts_and_reset_m1());
Serial.print(" ");
Serial.println(encoders_get_counts_and_reset_m2());
delay(1000);
}[/code]