26 #define DEBUG_PRINTER \ 32 #define DEBUG_PRINT(...) \ 33 { DEBUG_PRINTER.print(__VA_ARGS__); } 34 #define DEBUG_PRINTLN(...) \ 35 { DEBUG_PRINTER.println(__VA_ARGS__); } 37 #define DEBUG_PRINT(...) \ 39 #define DEBUG_PRINTLN(...) \ 50 #if defined(TARGET_NAME) && (TARGET_NAME == ARDUINO_NANO33BLE) 51 #ifndef microsecondsToClockCycles 56 #define microsecondsToClockCycles(a) ((a) * (SystemCoreClock / 1000000L)) 65 DHT(uint8_t pin, uint8_t type, uint8_t count = 6);
72 bool isFahrenheit =
true);
74 bool read(
bool force =
false);
85 uint32_t _lastreadtime, _maxcycles;
89 uint32_t expectPulse(
bool level);
98 #if !defined(ARDUINO_ARCH_NRF52) 103 #if !defined(ARDUINO_ARCH_NRF52) float convertCtoF(float)
Converts Celcius to Fahrenheit.
Definition: DHT.cpp:133
DHT(uint8_t pin, uint8_t type, uint8_t count=6)
Instantiates a new DHT class.
Definition: DHT.cpp:43
float convertFtoC(float)
Converts Fahrenheit to Celcius.
Definition: DHT.cpp:141
bool read(bool force=false)
Read value from sensor or return last one from less than two seconds.
Definition: DHT.cpp:232
float computeHeatIndex(bool isFahrenheit=true)
Compute Heat Index Simplified version that reads temp and humidity from sensor.
Definition: DHT.cpp:175
Class that stores state and functions for DHT.
Definition: DHT.h:66
void begin(uint8_t usec=55)
Setup sensor pins and set pull timings.
Definition: DHT.cpp:64
float readTemperature(bool S=false, bool force=false)
Read temperature.
Definition: DHT.cpp:86
Class that defines Interrupt Lock Avaiability.
Definition: DHT.h:98
float readHumidity(bool force=false)
Read Humidity.
Definition: DHT.cpp:149