View Single Post
  #8   Spotlight this post!  
Unread 15-05-2009, 12:02
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Misbehaving encoders

Quote:
Originally Posted by nathanww View Post
Each encoder's A and B outputs are wired to the signal in on the digital sidecar. We also use the power and ground on one PWM for those connections on the encoder
The encoder has four connections. Can you detail precisely where each of those connections is going? I hope you aren't really using PWM outputs for power.

How do you know the robot isn't reading the encoder properly?

Quote:
Code:
printf("encoder1=%d",encoder1->Get());
I didn't use C++ this season, and I don't have the documentation handy, so I don't know if %d is what you want. Doesn't the Get() method return a long integer?