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.
Android.h@3:36ff03cb6bab, 2018-01-13 (annotated)
- Committer:
- maskas
- Date:
- Sat Jan 13 18:53:38 2018 +0000
- Revision:
- 3:36ff03cb6bab
- Parent:
- 2:aeecb6277fc7
- Child:
- 4:5f1af832e593
Android communication;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| maskas | 0:9b41a36d03d9 | 1 | |
| maskas | 0:9b41a36d03d9 | 2 | #ifndef ANDROID_H |
| maskas | 0:9b41a36d03d9 | 3 | #define ANDROID_H |
| maskas | 0:9b41a36d03d9 | 4 | |
| maskas | 0:9b41a36d03d9 | 5 | /** |
| maskas | 0:9b41a36d03d9 | 6 | * Includes |
| maskas | 0:9b41a36d03d9 | 7 | */ |
| maskas | 0:9b41a36d03d9 | 8 | #include "mbed.h" |
| maskas | 2:aeecb6277fc7 | 9 | #include<string> |
| maskas | 1:6d9353593c3c | 10 | #include "Carousel.h" |
| maskas | 0:9b41a36d03d9 | 11 | |
| maskas | 0:9b41a36d03d9 | 12 | class Android { |
| maskas | 0:9b41a36d03d9 | 13 | public: |
| maskas | 0:9b41a36d03d9 | 14 | |
| maskas | 1:6d9353593c3c | 15 | Android (PinName txPin, PinName rxPin, Carousel& carousel); |
| maskas | 0:9b41a36d03d9 | 16 | private: |
| maskas | 3:36ff03cb6bab | 17 | Serial serial; |
| maskas | 3:36ff03cb6bab | 18 | Thread serialReadThread; |
| maskas | 0:9b41a36d03d9 | 19 | void onData(void); |
| maskas | 0:9b41a36d03d9 | 20 | void hearthBeat(void); |
| maskas | 0:9b41a36d03d9 | 21 | Ticker ticker; |
| maskas | 3:36ff03cb6bab | 22 | Ticker tickerReadSerial; |
| maskas | 0:9b41a36d03d9 | 23 | DigitalOut myled; |
| maskas | 1:6d9353593c3c | 24 | Carousel& carousel; |
| maskas | 2:aeecb6277fc7 | 25 | void sendToAndroid(string message); |
| maskas | 3:36ff03cb6bab | 26 | int readNumber(); |
| maskas | 0:9b41a36d03d9 | 27 | }; |
| maskas | 0:9b41a36d03d9 | 28 | #endif /* ANDROID_H */ |