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.
Diff: Android.cpp
- Revision:
- 4:5f1af832e593
- Parent:
- 3:36ff03cb6bab
- Child:
- 5:0df77b612c09
--- a/Android.cpp Sat Jan 13 18:53:38 2018 +0000 +++ b/Android.cpp Sun Jan 14 07:59:44 2018 +0000 @@ -33,18 +33,10 @@ -Android::Android(PinName txPin, PinName rxPin, Carousel& carousel): serial(txPin, rxPin), myled(LED1), carousel(carousel) { - this->serial.baud(115200); +Android::Android(Serial& serial, Carousel& carousel): serial(serial), myled(LED1), carousel(carousel) { this->serial.attach(callback(this, &Android::onData)); - //this->serial.attach(this, &Android::onData, MODSERIAL::RxAutoDetect); - //this->serial.autoDetectChar('\n'); - this->ticker.attach(callback(this, &Android::hearthBeat), 5.0f); - //this->tickerReadSerial.attach(callback(this, &Android::onData), 0.1f); - - this->carousel.callibrate(); - } @@ -88,6 +80,7 @@ this->serial.getc();//read newline } + int Android::readNumber() { this->serial.getc();//read newline char serialString[5];