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.
Arduino.h@0:d93ce07131fc, 2018-04-07 (annotated)
- Committer:
- ruke1ire
- Date:
- Sat Apr 07 04:11:19 2018 +0000
- Revision:
- 0:d93ce07131fc
- Child:
- 1:d96590319bcf
arduino;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ruke1ire | 0:d93ce07131fc | 1 | #ifndef ARDUINO |
ruke1ire | 0:d93ce07131fc | 2 | #define ARDUINO |
ruke1ire | 0:d93ce07131fc | 3 | |
ruke1ire | 0:d93ce07131fc | 4 | #include "mbed.h" |
ruke1ire | 0:d93ce07131fc | 5 | |
ruke1ire | 0:d93ce07131fc | 6 | class Arduino { |
ruke1ire | 0:d93ce07131fc | 7 | public: |
ruke1ire | 0:d93ce07131fc | 8 | Arduino(PinName tx, PinName rx); |
ruke1ire | 0:d93ce07131fc | 9 | int getLdrY(); |
ruke1ire | 0:d93ce07131fc | 10 | int getLdrX(); |
ruke1ire | 0:d93ce07131fc | 11 | int getColor(); |
ruke1ire | 0:d93ce07131fc | 12 | int getOrientation(); |
ruke1ire | 0:d93ce07131fc | 13 | |
ruke1ire | 0:d93ce07131fc | 14 | private: |
ruke1ire | 0:d93ce07131fc | 15 | Serial _arduino(_tx, _rx); |
ruke1ire | 0:d93ce07131fc | 16 | void _sendCommand(); |
ruke1ire | 0:d93ce07131fc | 17 | int _receiveData(); |
ruke1ire | 0:d93ce07131fc | 18 | }; |
ruke1ire | 0:d93ce07131fc | 19 | |
ruke1ire | 0:d93ce07131fc | 20 | #endif |