summaryrefslogtreecommitdiff
path: root/esp/src/dht11.cpp
blob: 990036385e08964bdc8e77ca1eb9d976a37c8628 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "DHT.h"
#include "dht11.h"

#define DHTPIN 32
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);

void setupDHT11() {
  dht.begin();
}

float lerTemperaturaDHT11() {
  return dht.readTemperature();
}

float lerUmidadeDHT11() {
  return dht.readHumidity();
}