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(); }