temperature and distance
Fork of TrashSensors by
GroveTemp.h@1:9cd59726cc5e, 2015-05-28 (annotated)
- Committer:
- Luminoscity
- Date:
- Thu May 28 23:11:33 2015 +0000
- Revision:
- 1:9cd59726cc5e
- Parent:
- 0:3f335fc50cef
Calibration at 5V;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
coyotebush | 0:3f335fc50cef | 1 | /* |
coyotebush | 0:3f335fc50cef | 2 | GroveTemp.h |
coyotebush | 0:3f335fc50cef | 3 | IoT GarbageCollectors |
coyotebush | 0:3f335fc50cef | 4 | |
coyotebush | 0:3f335fc50cef | 5 | Created by Timothy Ambrose on 4/29/15. |
coyotebush | 0:3f335fc50cef | 6 | */ |
coyotebush | 0:3f335fc50cef | 7 | |
coyotebush | 0:3f335fc50cef | 8 | #ifndef GROVE_TEMP_H |
coyotebush | 0:3f335fc50cef | 9 | #define GROVE_TEMP_H |
coyotebush | 0:3f335fc50cef | 10 | |
coyotebush | 0:3f335fc50cef | 11 | #include "mbed.h" |
coyotebush | 0:3f335fc50cef | 12 | #define TEMP_BETA 3975 |
coyotebush | 0:3f335fc50cef | 13 | |
coyotebush | 0:3f335fc50cef | 14 | class GroveTempSensor { |
coyotebush | 0:3f335fc50cef | 15 | private: |
coyotebush | 0:3f335fc50cef | 16 | float temperature, |
coyotebush | 0:3f335fc50cef | 17 | resistance, |
coyotebush | 0:3f335fc50cef | 18 | minTemp, |
coyotebush | 0:3f335fc50cef | 19 | maxTemp; |
coyotebush | 0:3f335fc50cef | 20 | bool minMaxDefined; |
coyotebush | 0:3f335fc50cef | 21 | |
coyotebush | 0:3f335fc50cef | 22 | public: |
coyotebush | 0:3f335fc50cef | 23 | GroveTempSensor(); |
coyotebush | 0:3f335fc50cef | 24 | float getTemp(); |
coyotebush | 0:3f335fc50cef | 25 | void resetMinMax(); |
coyotebush | 0:3f335fc50cef | 26 | float getMin(); |
coyotebush | 0:3f335fc50cef | 27 | float getMax(); |
coyotebush | 0:3f335fc50cef | 28 | }; |
coyotebush | 0:3f335fc50cef | 29 | |
coyotebush | 0:3f335fc50cef | 30 | #endif |