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.cpp
- Revision:
- 4:54c673c71fc0
- Parent:
- 3:c38d2f980494
- Child:
- 5:09fb0636207b
--- a/m3pi.cpp Mon Nov 01 23:30:09 2010 +0000
+++ b/m3pi.cpp Sun Nov 07 09:57:11 2010 +0000
@@ -24,7 +24,8 @@
#include "mbed.h"
#include "m3pi.h"
-m3pi::m3pi(PinName nrst, PinName tx, PinName rx) : Stream("m3pi"), _nrst(nrst), _ser(tx, rx) {
+m3pi::m3pi(PinName nrst, PinName tx, PinName rx) : Stream("m3pi"), _nrst(nrst), _ser(tx, rx), _leds(p20,p19,p18,p17,p16,p15,p14,p13) {
+ _leds = 0;
_ser.baud(115200);
reset();
}
@@ -33,6 +34,7 @@
_nrst = 0;
wait (0.01);
_nrst = 1;
+ wait (0.01);
}
void m3pi::left_motor (float speed) {
