sensor lib
Dependents: gather_sensor_data
DS1820Sensor.h@0:cbe8cd32b8d9, 2016-09-08 (annotated)
- Committer:
- readysteadygo2006
- Date:
- Thu Sep 08 14:05:15 2016 +0000
- Revision:
- 0:cbe8cd32b8d9
test;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
readysteadygo2006 | 0:cbe8cd32b8d9 | 1 | #ifndef MBED_DS1820_SENSOR_H |
readysteadygo2006 | 0:cbe8cd32b8d9 | 2 | #define MBED_DS1820_SENSOR_H |
readysteadygo2006 | 0:cbe8cd32b8d9 | 3 | |
readysteadygo2006 | 0:cbe8cd32b8d9 | 4 | #include "mbed.h" |
readysteadygo2006 | 0:cbe8cd32b8d9 | 5 | #include <string> |
readysteadygo2006 | 0:cbe8cd32b8d9 | 6 | #include "DS1820.h" |
readysteadygo2006 | 0:cbe8cd32b8d9 | 7 | #include "sensorTypes.h" |
readysteadygo2006 | 0:cbe8cd32b8d9 | 8 | |
readysteadygo2006 | 0:cbe8cd32b8d9 | 9 | |
readysteadygo2006 | 0:cbe8cd32b8d9 | 10 | class DS1820Sensor { |
readysteadygo2006 | 0:cbe8cd32b8d9 | 11 | |
readysteadygo2006 | 0:cbe8cd32b8d9 | 12 | public: |
readysteadygo2006 | 0:cbe8cd32b8d9 | 13 | DS1820Sensor(PinName one_wire_pinname); |
readysteadygo2006 | 0:cbe8cd32b8d9 | 14 | |
readysteadygo2006 | 0:cbe8cd32b8d9 | 15 | sensorStatus readSensor(string &sensor_reading); |
readysteadygo2006 | 0:cbe8cd32b8d9 | 16 | sensorStatus setReadingType(sensorReadingType sensor_reading_types = DS1820_ALL); |
readysteadygo2006 | 0:cbe8cd32b8d9 | 17 | sensorReadingType getReadingType(); |
readysteadygo2006 | 0:cbe8cd32b8d9 | 18 | |
readysteadygo2006 | 0:cbe8cd32b8d9 | 19 | private: |
readysteadygo2006 | 0:cbe8cd32b8d9 | 20 | DS1820 DS1820_sensor; |
readysteadygo2006 | 0:cbe8cd32b8d9 | 21 | sensorReadingType reading_type; |
readysteadygo2006 | 0:cbe8cd32b8d9 | 22 | }; |
readysteadygo2006 | 0:cbe8cd32b8d9 | 23 | |
readysteadygo2006 | 0:cbe8cd32b8d9 | 24 | #endif |