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

Dependents:   m3pi_USBSerialRPC m3pi_BluetoothRPC m3pi_HelloWorld m3pi_WiiRacing ... more

Files at this revision

API Documentation at this revision

Comitter:
chris
Date:
Mon Nov 01 16:18:55 2010 +0000
Parent:
1:816a80dcc1a3
Child:
3:c38d2f980494
Commit message:
Corrected code line_position function

Changed in this revision

m3pi.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/m3pi.cpp	Fri Oct 29 13:30:11 2010 +0000
+++ b/m3pi.cpp	Mon Nov 01 16:18:55 2010 +0000
@@ -101,7 +101,7 @@
     pos = _ser.getc();
     pos += _ser.getc() << 8;
     
-    float fpos = (pos - 2048)/2048;
+    float fpos = ((float)pos - 2048.0)/2048.0;
     return(fpos);
 }