Ejemplo temperatura para esp

develop
Gerardo 2023-03-06 15:01:13 +01:00
parent 1d6a3b24bf
commit 0c5ac40316
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
#include "stdio.h"
#include <GloboSonda.h>
#define PIN_DHT22 16
#define TIMER_LOG 3000
SensorDht dht(PIN_DHT22);
unsigned long Timer=0;
void setup() {
Serial.begin(9600);
}
void loop() {
if(!Utiles::isTime(&Timer,TIMER_LOG))
return;
Serial.print("Temperatura: ");
Serial.println(dht.GetT());
Serial.print("Humedad: ");
Serial.println(dht.GetH());
}