View Single Post
  #8   Spotlight this post!  
Unread 01-07-2013, 18:01
TRWSHSHLX TRWSHSHLX is offline
Registered User
AKA: Henry Lei
no team
 
Join Date: Jan 2011
Rookie Year: 2008
Location: OR
Posts: 71
TRWSHSHLX is an unknown quantity at this point
Re: FTC: Using the Hitechnic SuperPro Prototype Board

I don't have access to LabView or RobotC currently but the pseudo-code should be:
Code:
reset encoder;
while (encoder<some_value) //assuming positive is forward
{
  motors go forward;
}
motors stop;
Quote:
sometimes the robot moves correctly, other times it never stops moving, sometimes it moves the opposite direction, and sometimes it barely moves.
All of the possibilities above might be related to an encoder problem except moving in the opposite direction. Referring to the pseudo-code above, the motors only go one way (forward). If your teams and other teams are using built-in functions or blocks, then it might be possible that the "block" is not setup correctly (like negative encoder count is forward but a positive encoder count is used hence never reaching the value).

The code above has no feedback control and with a reliable reasonable drivetrain, it should consistently be +/- 1 in. per 2 feet.
__________________