The programme shows some of the features of the RenBuggyServo library in action.

Dependencies:   mbed

Revision:
1:1a5db4892449
Parent:
0:40e8ea905308
--- a/main.cpp	Fri Mar 07 08:01:42 2014 +0000
+++ b/main.cpp	Thu Mar 13 07:31:28 2014 +0000
@@ -9,7 +9,7 @@
 #include "mbed.h"
 #include "Car.h"
 
-Car myCar(P1_25, P1_24);
+Car myCar(P1_26, P1_24, 16, 16.65f, P0_7);
 
 // Main entry point of application.
 int main() {
@@ -28,16 +28,11 @@
     
     myCar.configureMotor_us(MOTOR_PWM, MOTOR_PERIOD);
     
-    // Drive the RenBuggy!
     myCar.setDirection(0);
-    wait(1);
-    myCar.forwards();
-    wait(4);
+    
+    myCar.forwards(7);
     myCar.setDirection(45);
-    wait(8);
-    myCar.setDirection(0);
-    wait(4);
-    myCar.setDirection(-45);
-    wait(8);
-    myCar.stop();
+    myCar.forwards(20);
+    myCar.setDirection(-30);
+    myCar.forwards(20);    
 }
\ No newline at end of file