Skip to content

Instantly share code, notes, and snippets.

@parzibyte

parzibyte/sensor.cpp

Last active Feb 17, 2020
Embed
What would you like to do?
#define PIN_CONEXION D8// A cuál pin está conectado el lector
#define TIPO_SENSOR DHT22 // Puede ser DHT11 también
DHT sensor(PIN_CONEXION, TIPO_SENSOR);
float humedad, temperaturaEnGradosCelsius = 0;
int ultimaVezLeido = 0;
long milisegundosDeEsperaParaLeer = 2000; // 2 segundos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment