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:
- 1:6d9353593c3c
- Parent:
- 0:9b41a36d03d9
- Child:
- 2:aeecb6277fc7
--- a/Android.cpp Sun Jan 07 11:59:16 2018 +0000 +++ b/Android.cpp Mon Jan 08 16:09:56 2018 +0000 @@ -3,18 +3,19 @@ #include "mbed.h" #include "Android.h" -Android::Android(PinName txPin, PinName rxPin): serial(txPin, rxPin), myled(LED1) { +Android::Android(PinName txPin, PinName rxPin, Carousel& carousel): serial(txPin, rxPin), myled(LED1), carousel(carousel) { //Serial pc(USBTX, USBRX); // tx, rx this->serial.baud(115200); this->serial.attach(callback(this, &Android::onData)); - this->ticker.attach(callback(this, &Android::hearthBeat), 2.0); + this->ticker.attach(callback(this, &Android::hearthBeat), 5.0f); + + this->carousel.callibrate(); } void Android::hearthBeat(void) { - this->myled = !this->myled; printf("HEARTH BEAT SENT\n"); this->serial.printf("ARD_HB"); this->serial.putc(-91);