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.
Dependencies: mbed
IRSensor.h@1:602bef894c04, 2018-04-20 (annotated)
- Committer:
- Jacqueline
- Date:
- Fri Apr 20 20:57:10 2018 +0000
- Revision:
- 1:602bef894c04
- Parent:
- 0:fb92f1c4101d
Rotationen vollst?ndig
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
fluckmi1 | 0:fb92f1c4101d | 1 | #ifndef IR_SENSOR_H_ |
fluckmi1 | 0:fb92f1c4101d | 2 | #define IR_SENSOR_H_ |
fluckmi1 | 0:fb92f1c4101d | 3 | #include <cstdlib> |
fluckmi1 | 0:fb92f1c4101d | 4 | #include <mbed.h> |
fluckmi1 | 0:fb92f1c4101d | 5 | class IRSensor |
fluckmi1 | 0:fb92f1c4101d | 6 | { |
fluckmi1 | 0:fb92f1c4101d | 7 | public: |
fluckmi1 | 0:fb92f1c4101d | 8 | IRSensor(AnalogIn& distance, DigitalOut& bit0, DigitalOut& bit1, DigitalOut& bit2, int number); |
fluckmi1 | 0:fb92f1c4101d | 9 | virtual ~IRSensor(); |
fluckmi1 | 0:fb92f1c4101d | 10 | float read(); |
fluckmi1 | 0:fb92f1c4101d | 11 | private: |
fluckmi1 | 0:fb92f1c4101d | 12 | AnalogIn& distance; |
fluckmi1 | 0:fb92f1c4101d | 13 | DigitalOut& bit0; |
fluckmi1 | 0:fb92f1c4101d | 14 | DigitalOut& bit1; |
fluckmi1 | 0:fb92f1c4101d | 15 | DigitalOut& bit2; |
fluckmi1 | 0:fb92f1c4101d | 16 | int number; |
fluckmi1 | 0:fb92f1c4101d | 17 | }; |
fluckmi1 | 0:fb92f1c4101d | 18 | #endif /* IR_SENSOR_H_ */ |