View Single Post
  #1   Spotlight this post!  
Unread 04-10-2008, 13:31
1jbinder 1jbinder is offline
Registered User
FRC #0852
 
Join Date: Jan 2008
Location: Athenian School
Posts: 35
1jbinder is an unknown quantity at this point
Encoder Oscillation Issues

Hi All,
We are using the Kevin Watson drive code and his encoder.c and encoder.h files. We modified the ISR's of both encoder five and six to be the same as three and four. We are using a holonomic drive system with four wheels. Our main drive wheels that control the front and back motion are using encoders 3 and 4 and they work fine. However our strafing motors which use encoders 5 and 6 do not seem to be working correctly in autonomous. They seem to be able to count clicks until they reach anywhere between 120 and 160 clicks. Then they start counting down even though the direction of rotation on the wheels did not change. Anytime before they approach zero they will once again reverse direction and start counting up again. I cannot seem to find the problem. It could be with my modifications to the encoder code but i recall that those were modified so that they would work in the first place. I am attaching the encoder.c and encoder.h code that we are using.
Thanks,
Julian Binder
Attached Files
File Type: c encoder.c (24.5 KB, 92 views)
File Type: h encoder.h (5.6 KB, 82 views)