mirror of
https://github.com/adafruit/DHT-sensor-library.git
synced 2023-10-23 22:20:38 +03:00
Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
61ffee54ba | |||
cfaa202f96 | |||
86115884c7 | |||
b64fe15ad0 | |||
7062b127f0 | |||
f0a66b0dd3 | |||
b504fa540e | |||
fa22bc6ca4 | |||
a1f0c1c038 | |||
13d25e6b9a | |||
8de033bae1 | |||
a7157aa586 | |||
4f841c64b2 | |||
d0a1035985 | |||
7528a843dd | |||
5ce3bce49c | |||
44a80e01e6 | |||
6a843cb8aa |
5
DHT.cpp
5
DHT.cpp
@ -26,7 +26,9 @@
|
||||
#include "DHT.h"
|
||||
|
||||
#define MIN_INTERVAL 2000 /**< min interval value */
|
||||
#define TIMEOUT -1 /**< timeout on */
|
||||
#define TIMEOUT \
|
||||
UINT32_MAX /**< Used programmatically for timeout. \
|
||||
Not a timeout duration. Type: uint32_t. */
|
||||
|
||||
/*!
|
||||
* @brief Instantiates a new DHT class
|
||||
@ -38,6 +40,7 @@
|
||||
* number of sensors
|
||||
*/
|
||||
DHT::DHT(uint8_t pin, uint8_t type, uint8_t count) {
|
||||
(void)count; // Workaround to avoid compiler warning.
|
||||
_pin = pin;
|
||||
_type = type;
|
||||
#ifdef __AVR
|
||||
|
10
DHT.h
10
DHT.h
@ -47,6 +47,16 @@
|
||||
#define DHT21 21 /**< DHT TYPE 21 */
|
||||
#define AM2301 21 /**< AM2301 */
|
||||
|
||||
#if defined(TARGET_NAME) && (TARGET_NAME == ARDUINO_NANO33BLE)
|
||||
#ifndef microsecondsToClockCycles
|
||||
/*!
|
||||
* As of 7 Sep 2020 the Arduino Nano 33 BLE boards do not have
|
||||
* microsecondsToClockCycles defined.
|
||||
*/
|
||||
#define microsecondsToClockCycles(a) ((a) * (SystemCoreClock / 1000000L))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* @brief Class that stores state and functions for DHT
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
name=DHT sensor library
|
||||
version=1.3.9
|
||||
version=1.4.1
|
||||
author=Adafruit
|
||||
maintainer=Adafruit <info@adafruit.com>
|
||||
sentence=Arduino library for DHT11, DHT22, etc Temp & Humidity Sensors
|
||||
|
Reference in New Issue
Block a user