Library for the m3pi robot. This works with a Pololu 3pi robot with the Serial Slave firmware, and exposes and API. This is a fork of cstyles m3pi library.

Dependents:   newlib PID Robot WarehouseBot1 ... more

Fork of m3pi_ng by Nikolas Goldin

Files at this revision

API Documentation at this revision

Comitter:
jomkippur
Date:
Fri May 17 11:14:01 2013 +0000
Parent:
11:2761054a8926
Commit message:
store_keeper

Changed in this revision

m3pi_ng.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 2761054a8926 -r bfad7a7422fb m3pi_ng.cpp
--- a/m3pi_ng.cpp	Wed May 15 14:48:30 2013 +0000
+++ b/m3pi_ng.cpp	Fri May 17 11:14:01 2013 +0000
@@ -109,8 +109,25 @@
 }
 
 void m3pi::stop (void) {
-    motor(0,0.0);
-    motor(1,0.0);
+     motor(0,0);
+     motor(1,0);
+  
+// thomas 17.05.2013
+/*
+  float brakespeed; 
+  brakespeed=0.2;
+   
+  for (int i=2;i==0;i=i-1)
+    {
+     
+      brakespeed=brakespeed*i/1000;
+     
+     
+     motor(0,brakespeed);
+     motor(1,brakespeed);
+     wait(0.01*i);
+    }
+*/    
 }
 
 void m3pi::motor (int motor, float speed) {