Modified library for the m3pi robot with individual calibrated sensor measurement functionality. This works with a Pololu 3pi robot with the Serial Slave firmware.

Fork of m3pi by Chris Styles

Revision:
9:d9682f35e58a
Parent:
7:9b128cebb3c2
--- a/m3pi.cpp	Thu May 12 13:26:37 2011 +0000
+++ b/m3pi.cpp	Tue Oct 02 16:35:36 2018 +0000
@@ -102,6 +102,17 @@
     return(v);
 }
 
+int * m3pi::calibrated_sensors() {
+    int i;
+    static int sensors[5];
+    _ser.putc(SEND_CALIBRATED_SENSOR_VALUES);
+    for(i=0;i<5;i++){
+        sensors[i] = _ser.getc();
+        sensors[i] += _ser.getc() << 8;
+    }
+    return(sensors);
+}
+
 float m3pi::line_position() {
     int pos = 0;
     _ser.putc(SEND_LINE_POSITION);