Quote:
|
Originally Posted by Kevin
How did you hook up the encoders (electrically and mechanically)?
-Kevin
|
Quote:
|
Originally Posted by Alan Anderson
The most likely reason is that the values really are zero. That would happen if your encoders aren't being processed correctly. How do you have the Grayhill encoders wired? Have you added code that disables the interrupts on their digital input pins?
Earlier you said that the encoders work when you're not also using the gyro. How did you determine this?
|
Electrically it is hooked up as per the recommendations on the encoder.c file. Mechanically it is hooked up to the motor shaft (which of course is not same to the final gear output on the wheel). We compensated for this by calculating the gear ratio and converting these in a relationship to the counts per revolution of the wheel, which with our custom gearbox comes to around 1245 counts per wheel revolution. I can let you know the exact parameters of the calculation tomorrow morning as a mechanical engineering mentor did those calculations and i am not certain of those from the top of my head.
I can say the encoders are working because i tried out the frc_encoder code (available from Mr. Watson's website) with the encoders hooked up. The wheels were manually rotated, and the encoders responded as they were supposed to and their measurements are consistent with out gear ratios.