View Single Post
  #4   Spotlight this post!  
Unread 04-02-2011, 02:42
Tim Delles's Avatar
Tim Delles Tim Delles is offline
Since 2001.
FRC #0078
Team Role: Mentor
 
Join Date: Dec 2004
Rookie Year: 2001
Location: Providence, RI
Posts: 1,002
Tim Delles has a reputation beyond reputeTim Delles has a reputation beyond reputeTim Delles has a reputation beyond reputeTim Delles has a reputation beyond reputeTim Delles has a reputation beyond reputeTim Delles has a reputation beyond reputeTim Delles has a reputation beyond reputeTim Delles has a reputation beyond reputeTim Delles has a reputation beyond reputeTim Delles has a reputation beyond reputeTim Delles has a reputation beyond repute
Re: [FTC]: DC MotorEncoder Code

Code:
nMotorEncoder[motorA] = 0;
wait1Msec(50);
nMotorEncoderTarget[motorA] = x;    <- set this to the number of rotations the Motor Encoder needs to rotate
motor[motorA] = 100;
while ((nMotorRunState[leftMotor] != runStateIdle))
  {
    EndTimeSlice();
  }
  return;
This can only be used if you have a shaft encoder attached to the motor you want to use. Good luck.
__________________
Timothy Delles - Clarkson University
2011 - Present: FRC Team 78 - AIR Strike
2011 - Present: VEX Team 78 - AIR Strike
2010 - 2011: FRC Team 3280 - Rhode Rebels
2001 - 2009: FRC Team 229 - Division By Zero
Reply With Quote