Skip to content

Instantly share code, notes, and snippets.

Created February 19, 2020 02:50
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
// Si han pasado más de 5 segundos desde la última vez, enviar a Adafruit!
if (millis() - ultimaVez > TIEMPO_ESPERA)
humedad = sensor.readHumidity();
temperaturaEnGradosCelsius = sensor.readTemperature();
// En ocasiones puede devolver datos erróneos; por eso lo comprobamos
if (isnan(temperaturaEnGradosCelsius) || isnan(humedad))
ultimaVez = millis();
ultimaVez = millis();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment