Version finale
Dependencies: mbed
Fork of Main_V3_Old by
DHT22.h@7:2748b1a2742c, 2018-01-15 (annotated)
- Committer:
- ramialjed
- Date:
- Mon Jan 15 16:34:24 2018 +0000
- Revision:
- 7:2748b1a2742c
- Parent:
- 5:ae57f8977663
Version finale
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ramialjed | 5:ae57f8977663 | 1 | #ifndef MBED_DHT22_H |
ramialjed | 5:ae57f8977663 | 2 | #define MBED_DHT22_H |
ramialjed | 5:ae57f8977663 | 3 | |
ramialjed | 5:ae57f8977663 | 4 | #include "mbed.h" |
ramialjed | 5:ae57f8977663 | 5 | |
ramialjed | 5:ae57f8977663 | 6 | class DHT22 { |
ramialjed | 5:ae57f8977663 | 7 | private: |
ramialjed | 5:ae57f8977663 | 8 | int _temperature,_humidity; |
ramialjed | 5:ae57f8977663 | 9 | PinName _data_pin; |
ramialjed | 5:ae57f8977663 | 10 | public: |
ramialjed | 5:ae57f8977663 | 11 | DHT22(PinName); |
ramialjed | 5:ae57f8977663 | 12 | bool sample(); |
ramialjed | 5:ae57f8977663 | 13 | int getTemperature(); |
ramialjed | 5:ae57f8977663 | 14 | int getHumidity(); |
ramialjed | 5:ae57f8977663 | 15 | }; |
ramialjed | 5:ae57f8977663 | 16 | |
ramialjed | 5:ae57f8977663 | 17 | #endif |