by chicago wire guy » Tue Nov 20, 2012 9:13 pm
Hi All
Happy Thanksgiving!
I am using the latest version of AdaEncoder.h w/PinchangeInt.h
I am running a DC Motor w/encoder pololu 131:1 gear motor, 64CPR item#1447 with pololu motor shield VNH5019 on a Duemilanove 328.
Basically I have the user input the perameters that set the number of revolutions needed for a run and the number of total runs needed for a batch. My problem is that after the first loop counting steps (works fine, testing by hand, not powering the motor at speed), when the loop is to be repeated the encoder steps outputs a starting point of 4294967294 instead of 0. I'v tried both the easy method and the "you like to sweat" methode on the adaencoder.h wiki. I try to set int8_t clicks back to 0 at the start of each loop but it doesn't seem to flow back to the library I guess?
Currently I am reading the outputs on the Adafruit I2C LCD (which is great and so easy to use)
I will only be running in one direction at relatively low speeds with just one motor and 1 encoder.
I can post my ugly code if anyone thinks it will help, but the problem seems to be in the reinitializing the starting point on the encoder since it works fine on the first pass through