View Single Post
  #2   Spotlight this post!  
Unread 18-03-2011, 13:32
Egg 3141592654's Avatar
Egg 3141592654 Egg 3141592654 is offline
Now a mentor, always a student
FRC #0810 (Mechanical Bulls)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Long Island
Posts: 53
Egg 3141592654 is on a distinguished road
Re: Bit of coding help

If you want the robot to move backwards, instead of using a while loop, replace with something like...

Code:
drive.arcadeDrive(-.5 , 0);
Timer.delay(/*insert time you want to go backwards in milliseconds*/);
drive.arcadeDrive(0 , 0);
To answer why your robot may not be moving backwards, the loop might be cycling too fast for you to actually notice, so 5 cycles would be instant. Remember to put the drive.arcadeDrive(0 , 0) or else your robot will keep driving backwards. Good luck out there!
__________________
"The answers to the book of life are not found in the back." Charlie Brown

Software Mentor - Team Apex Robotics 5803

Lead Programmer - Team 810 Mechanical Bulls '09-'11

Last edited by Egg 3141592654 : 18-03-2011 at 13:33. Reason: missed code tag
Reply With Quote