Arduino with Wheel encoders

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]

Hello.

I am sorry you are having trouble with the encoder library. I did not notice anything obviously wrong with your code. Can you tell me more about your setup? Specifically which encoder are you using? How are you supplying power? Can you post pictures of your setup that clearly show your connections?

Also, could you verify that you are using the correct version of the wheel encoder library? It is available in both a set of AVR libraries and a set of Arduino libraries; the Arduino libraries, which are downloaded from here, are the ones you should be using.

-Jon