Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: newlib PID Robot WarehouseBot1 ... more
Fork of m3pi_ng by
Diff: m3pi.cpp
- Revision:
- 7:9b128cebb3c2
- Parent:
- 6:62ee1486ecb9
--- a/m3pi.cpp Wed Nov 10 09:01:21 2010 +0000
+++ b/m3pi.cpp Fri Mar 25 15:44:52 2011 +0000
@@ -24,12 +24,17 @@
#include "mbed.h"
#include "m3pi.h"
-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;
+m3pi::m3pi(PinName nrst, PinName tx, PinName rx) : Stream("m3pi"), _nrst(nrst), _ser(tx, rx) {
_ser.baud(115200);
reset();
}
+m3pi::m3pi() : Stream("m3pi"), _nrst(p23), _ser(p9, p10) {
+ _ser.baud(115200);
+ reset();
+}
+
+
void m3pi::reset () {
_nrst = 0;
wait (0.01);
@@ -143,6 +148,8 @@
void m3pi::leds(int val) {
+
+ BusOut _leds(p20,p19,p18,p17,p16,p15,p14,p13);
_leds = val;
}
