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.
IRSensor.h@0:667a753ef94f, 2017-05-10 (annotated)
- Committer:
- ZHAW_Prometheus
- Date:
- Wed May 10 08:54:53 2017 +0000
- Revision:
- 0:667a753ef94f
IRSensorLib_0.1
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| ZHAW_Prometheus | 0:667a753ef94f | 1 | #ifndef Sensor_Auslesen |
| ZHAW_Prometheus | 0:667a753ef94f | 2 | #define Sensor_Auslesen |
| ZHAW_Prometheus | 0:667a753ef94f | 3 | |
| ZHAW_Prometheus | 0:667a753ef94f | 4 | #include <mbed.h> |
| ZHAW_Prometheus | 0:667a753ef94f | 5 | #include <cstdlib> |
| ZHAW_Prometheus | 0:667a753ef94f | 6 | |
| ZHAW_Prometheus | 0:667a753ef94f | 7 | class IRSensor |
| ZHAW_Prometheus | 0:667a753ef94f | 8 | { |
| ZHAW_Prometheus | 0:667a753ef94f | 9 | |
| ZHAW_Prometheus | 0:667a753ef94f | 10 | public: |
| ZHAW_Prometheus | 0:667a753ef94f | 11 | |
| ZHAW_Prometheus | 0:667a753ef94f | 12 | IRSensor(AnalogIn* distance, DigitalOut* bit0, DigitalOut* bit1, DigitalOut* bit2, int number); |
| ZHAW_Prometheus | 0:667a753ef94f | 13 | IRSensor(); |
| ZHAW_Prometheus | 0:667a753ef94f | 14 | |
| ZHAW_Prometheus | 0:667a753ef94f | 15 | void init(AnalogIn* distance, DigitalOut* bit0, DigitalOut* bit1, DigitalOut* bit2, int number); |
| ZHAW_Prometheus | 0:667a753ef94f | 16 | virtual ~IRSensor(); |
| ZHAW_Prometheus | 0:667a753ef94f | 17 | float read(); |
| ZHAW_Prometheus | 0:667a753ef94f | 18 | |
| ZHAW_Prometheus | 0:667a753ef94f | 19 | operator float(); |
| ZHAW_Prometheus | 0:667a753ef94f | 20 | |
| ZHAW_Prometheus | 0:667a753ef94f | 21 | private: |
| ZHAW_Prometheus | 0:667a753ef94f | 22 | |
| ZHAW_Prometheus | 0:667a753ef94f | 23 | AnalogIn* distance; |
| ZHAW_Prometheus | 0:667a753ef94f | 24 | DigitalOut* bit0; |
| ZHAW_Prometheus | 0:667a753ef94f | 25 | DigitalOut* bit1; |
| ZHAW_Prometheus | 0:667a753ef94f | 26 | DigitalOut* bit2; |
| ZHAW_Prometheus | 0:667a753ef94f | 27 | |
| ZHAW_Prometheus | 0:667a753ef94f | 28 | int number; |
| ZHAW_Prometheus | 0:667a753ef94f | 29 | }; |
| ZHAW_Prometheus | 0:667a753ef94f | 30 | #endif |