View Single Post
  #2   Spotlight this post!  
Unread 01-03-2009, 16:48
excel2474's Avatar
excel2474 excel2474 is offline
Registered User
AKA: Aaron Stewart
FRC #2474 (Excel)
Team Role: Engineer
 
Join Date: Mar 2008
Rookie Year: 2008
Location: Niles, Michigan
Posts: 177
excel2474 is a jewel in the roughexcel2474 is a jewel in the roughexcel2474 is a jewel in the roughexcel2474 is a jewel in the rough
Re: Autonomous Driving

under the autonomous portion of the code do something like:

rightmotor->Set(1);// motor speeds range from -1 to 1
leftmotor->Set(1);// so this sets both motors full speed forward
Wait(3.0); //Both motors will remain full speed forward for 3 seconds
rightmotor->Set(-1);// right motor turns backward full speed
leftmotor->Set(1);// left motor turn forward full speed
Wait(2.0);// So the robot will spin in circles(right) for 2 seconds
rightmotor(0.0);// stop right motor
leftmotor(0.0);// stop right motor



I hope this helps. I put the comments in there so you can see what is going on.
__________________
"Find some thing you like to do and EXCEL at it with dilligence."

University of Notre Dame- Mechanical Engineering.
Reply With Quote