! * @brief Instantiates a new DHT class * @param pin * pin number that sensor is connected * @param type * type of sensor * @param count * number of sensors */
| 40 | * number of sensors |
| 41 | */ |
| 42 | DHT::DHT(uint8_t pin, uint8_t type, uint8_t count) { |
| 43 | (void)count; // Workaround to avoid compiler warning. |
| 44 | _pin = pin; |
| 45 | _type = type; |
| 46 | #ifdef __AVR |
| 47 | _bit = digitalPinToBitMask(pin); |
| 48 | _port = digitalPinToPort(pin); |
| 49 | #endif |
| 50 | _maxcycles = |
| 51 | microsecondsToClockCycles(1000); // 1 millisecond timeout for |
| 52 | // reading pulses from DHT sensor. |
| 53 | // Note that count is now ignored as the DHT reading algorithm adjusts itself |
| 54 | // based on the speed of the processor. |
| 55 | } |
| 56 | |
| 57 | /*! |
| 58 | * @brief Setup sensor pins and set pull timings |
nothing calls this directly
no outgoing calls
no test coverage detected