View Single Post
  #1   Spotlight this post!  
Unread 20-01-2008, 16:23
penguain penguain is offline
Registered User
AKA: Barry Preston
FRC #1997 (Stag Robotics)
Team Role: Programmer
 
Join Date: Nov 2006
Rookie Year: 2007
Location: Bishop Miege High School
Posts: 18
penguain is an unknown quantity at this point
Robot Drive for 10 seconds

unsigned int timer = 0;

//Forward for 10 seconds
if(timer < 382){
pwm01 = pwm02 = 225;
timer++;
}

since the autonomus loops every 26.2ms
10 / 0.0262 = ~382

would this work to drive the robot forward for 10s/


thanks
__________________
2007 Greater Kansas City Regional Champions
2008 Greater Kansas City Regional Finalists