|
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.
|