View Single Post
  #4   Spotlight this post!  
Unread 15-05-2009, 15:27
nathanww nathanww is offline
Hacker
FRC #1678 (Citrus Circuits)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2007
Location: Davis, CA
Posts: 224
nathanww is just really nicenathanww is just really nicenathanww is just really nicenathanww is just really nice
Re: Misbehaving encoders

Quote:
You've shown three wires going to one thing, and one wire going to another. The sketch doesn't show which pins on those "things" the wires go to. If your labeling of the wires on the left matches the order they're connected to the GPIO pins, I think you have +5 and ground reversed.
I don't have the robot to look at, so I accidentally reversed them on the diagram. We know that the orientation is correct on the robot because the encoder LEDs are lighting, which wouldn't happen if they were getting reversed current, and we can get some variation as we turn the wheel, so it's not something weird like getting the ground and signal wires mixed up.


And yeah, we're running it in the teleop mode,and we have other sensors on the GPIO that work fine
__________________
Get yer robot source code here!