corrected error assignation of motors in methods right and left. now it work fun. Added function to read calibrated sensors data.
Fork of m3pi by
Diff: m3pi.h
- Revision:
- 9:0764f5bf6ab9
- Parent:
- 8:4b7d6ea9b35b
--- a/m3pi.h Thu May 12 13:26:37 2011 +0000
+++ b/m3pi.h Mon Nov 04 22:17:27 2013 +0000
@@ -32,6 +32,7 @@
#define SEND_SIGNATURE 0x81
#define SEND_RAW_SENSOR_VALUES 0x86
+#define SEND_CALIB_SENSOR_VALUES 0x87
#define SEND_TRIMPOT 0xB0
#define SEND_BATTERY_MILLIVOLTS 0xB1
#define DO_PLAY 0xB3
@@ -163,7 +164,12 @@
* 1.0 means the line is on the right
*/
float line_position (void);
-
+ /** lecture capteurs calibres
+ * @returns tableau val capteurs de gauche à droite
+ * 0 blanc (reflexion max)
+ * 1000 noir (pas de reflexion)
+ */
+ void calibrated_sensors(unsigned short ltab[5]);
/** Calibrate the sensors. This turns the robot left then right, looking for a line
*
