View Single Post
  #5   Spotlight this post!  
Unread 04-02-2011, 14:54
clwillingham clwillingham is offline
Registered User
AKA: Chris 1.0
FTC #2845 (Team Duct Tape)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2006
Location: Tampa
Posts: 7
clwillingham is an unknown quantity at this point
Re: [FTC]: DC MotorEncoder Code

another way thats a bit more direct but probably a little bit less reliable in terms of skidding:

Code:
motor[FL] = power;
motor[FR] = power;
motor[BL] = power;
motor[BR] = power;
while(nMotorEncoder[FL] < units){}
Stop(); // we wrote this function to set every motor to 0.
please note that this code is for a four wheel drive robot.
Reply With Quote