Craig Evans
/
3pi_Move
Example to move the robot.
Fork of 3pi_Line_Follow by
Embed:
(wiki syntax)
Show/hide line numbers
code.cpp
00001 #include "main.h" 00002 00003 // code in here runs again and again 00004 void repeat() 00005 { 00006 // move both motors at 25% speed, the robot should move forwards 00007 robot.left_motor(0.25); 00008 robot.right_motor(0.25); 00009 00010 // carry on going forward for 2 seconds 00011 wait(2.0); 00012 00013 // make robot spin right (clock-wise) 00014 robot.left_motor(0.25); 00015 robot.right_motor(-0.25); 00016 00017 // you can change this value to tune the turning angle 00018 wait(0.5); 00019 00020 }
Generated on Sun Jul 17 2022 17:43:01 by 1.7.2