From 7ccab61c22fafb3bb9fa5470ff8cb46217111fe4 Mon Sep 17 00:00:00 2001 From: Gustavoeklund01 Date: Mon, 27 Oct 2025 20:28:29 -0300 Subject: outros códigos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- esp/src/dht11.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'esp/src/dht11.cpp') diff --git a/esp/src/dht11.cpp b/esp/src/dht11.cpp index e69de29..9900363 100644 --- a/esp/src/dht11.cpp +++ b/esp/src/dht11.cpp @@ -0,0 +1,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(); +} -- cgit v1.2.3