Ren Buggy / 1-RenBuggyTimed

Dependencies:   mbed-renbed

Files at this revision

API Documentation at this revision

Comitter:
RenBuggy
Date:
Thu Mar 31 10:54:09 2016 +0000
Parent:
0:9870f526ddd1
Child:
2:949a87c7042f
Commit message:
-changed pin references to PX_XX type ; -general revisions

Changed in this revision

TimedMovement.cpp Show annotated file Show diff for this revision Revisions of this file
TimedMovement.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/TimedMovement.cpp	Fri Mar 11 10:36:38 2016 +0000
+++ b/TimedMovement.cpp	Thu Mar 31 10:54:09 2016 +0000
@@ -43,7 +43,7 @@
     Lmotor = Rmotor = 1.0;
     /* the program will wait here for the length of time passed 
     to the function before continuing. wait() is a function 
-    provided from mbed.h; a loop could be used instead. */
+    provided from mbed.h */
     wait(time);
 }
 
--- a/TimedMovement.h	Fri Mar 11 10:36:38 2016 +0000
+++ b/TimedMovement.h	Thu Mar 31 10:54:09 2016 +0000
@@ -14,12 +14,12 @@
 /* mbed.h must be included in this file also */
 #include "mbed.h"
 
-/* #define LeftMotorPin p5 tells the preprocessor to replace
-any mention of LeftMotorPin with p5. This is used to select 
-which pins to use to control the motors. Here pins 5 and 6 
-are used. */
-#define LeftMotorPin p5
-#define RightMotorPin p6
+/* #define LeftMotorPin P1_26 tells the preprocessor to replace
+any mention of LeftMotorPin with P1_26. This is used to select 
+which pins to use to control the motors. Here pins DIP9 and DIP10 
+are used, which correspond to P1_27 and P1_26. */
+#define LeftMotorPin P1_27
+#define RightMotorPin P1_26
 
 /* these are function prototypes that declare all the functions
 in the library. extern tells the compiler that the functions
--- a/main.cpp	Fri Mar 11 10:36:38 2016 +0000
+++ b/main.cpp	Thu Mar 31 10:54:09 2016 +0000
@@ -34,7 +34,11 @@
     them to run for by passing a variable which represents a 
     length of time in seconds */
     forward(5);
-    left(2);
-    forward(5);
+    left(3);
+    forward(2);
+    stop();
+    wait(3);
+    right(3);
+    forward(6);
     stop();
 }
--- a/mbed.bld	Fri Mar 11 10:36:38 2016 +0000
+++ b/mbed.bld	Thu Mar 31 10:54:09 2016 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/252557024ec3
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/99a22ba036c9
\ No newline at end of file