mirror of
https://github.com/adafruit/DHT-sensor-library.git
synced 2023-10-23 22:20:38 +03:00
Support for non 16mhz devices
Added constructor parameter to allow for different timing needs. It has the a default value of 6 which is the original value, so it should be backwards compatible
This commit is contained in:
4
DHT.h
4
DHT.h
@ -23,13 +23,13 @@ written by Adafruit Industries
|
||||
class DHT {
|
||||
private:
|
||||
uint8_t data[6];
|
||||
uint8_t _pin, _type;
|
||||
uint8_t _pin, _type, _count;
|
||||
boolean read(void);
|
||||
unsigned long _lastreadtime;
|
||||
boolean firstreading;
|
||||
|
||||
public:
|
||||
DHT(uint8_t pin, uint8_t type);
|
||||
DHT(uint8_t pin, uint8_t type, uint8_t count=6);
|
||||
void begin(void);
|
||||
float readTemperature(bool S=false);
|
||||
float convertCtoF(float);
|
||||
|
Reference in New Issue
Block a user