The robot's name is Geoffry in this program. This program tests the "slowstop" function

Dependencies:   m3pi_ng mbed

Files at this revision

API Documentation at this revision

Comitter:
satyson
Date:
Tue May 20 14:01:44 2014 +0000
Commit message:
This test uses the slowstop function to stop the robot without jerrking

Changed in this revision

m3pi_ng.lib 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
diff -r 000000000000 -r 1242cb9e4142 m3pi_ng.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m3pi_ng.lib	Tue May 20 14:01:44 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/ngoldin/code/m3pi_ng/#da9ef3d5c3fe
diff -r 000000000000 -r 1242cb9e4142 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue May 20 14:01:44 2014 +0000
@@ -0,0 +1,40 @@
+    #include "m3pi_ng.h"
+    #include "mbed.h"
+    
+    m3pi Geoffry;
+    
+    int main () 
+    {
+     // Give time to back away
+     
+     //set a slow speed of the robot
+     float speed = 0.3;
+     
+     // Make robot go forward
+     // Test to see if forward command operates with the wait command
+     
+     
+     Geoffry.forward(speed);
+     wait(0.5);
+     Geoffry.slowstop(speed,0.01,100); 
+     Geoffry.stop();
+     
+     
+     Geoffry.backward(speed);
+     wait(0.5);
+     Geoffry.slowstop(-1*speed,0.01,100);
+     
+     
+     
+     //This section is to test out the slowstop function
+     /*     
+     Geoffry.forward(speed+0.2);
+     Geoffry.slowstop(speed+0.2,0.1,10.0);   
+    
+     wait(1.0);
+    
+     Geoffry.backward(speed+0.2);
+     Geoffry.slowstop(speed+0.2,0.1,10.0);
+     wait(1.0);
+    */
+    }
diff -r 000000000000 -r 1242cb9e4142 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue May 20 14:01:44 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/0b3ab51c8877
\ No newline at end of file