Class that stores the state and functions for the DHT.
More...
#include <TinyDHT.h>
Class that stores the state and functions for the DHT.
◆ DHT()
DHT::DHT |
( |
uint8_t |
pin, |
|
|
uint8_t |
type, |
|
|
uint8_t |
count = 6 |
|
) |
| |
DHT constructor.
- Parameters
-
pin | Pin connected to the DHT |
type | What sensor you're connecting, DHT11, DHT22, DHT21, AM2301 |
count | Used to set how much data to take at a time. Very few reasons to change this |
◆ readTemperature()
int16_t DHT::readTemperature |
( |
bool |
S = false | ) |
|
Reads the temperature from device.
- Parameters
-
S | Scale. True = Fahrenheit, False = Celcius |
- Returns
- Returns the temperature
◆ convertCtoF()
int16_t DHT::convertCtoF |
( |
int16_t |
c | ) |
|
Converts Celcius to Fahrenheit.
- Parameters
-
- Returns
- Returns the inputted degrees converted to Fahrenheit
◆ readHumidity()
uint8_t DHT::readHumidity |
( |
void |
| ) |
|
Reads the humidity from the device.
- Returns
- Returns the humidity read from the device
The documentation for this class was generated from the following files: