Created
May 6, 2020 01:33
-
-
Save jaimedantas/077cd96dcc6ff2c6181f00b0a73f53fe to your computer and use it in GitHub Desktop.
Arduino loop()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void loop() | |
{ | |
if(locUpTime - generalTime > 3){ | |
int chk = DHT.read22(DHT11_PIN); | |
dtostrf(DHT.temperature, 4,1,TemperatiraDHT); | |
dtostrf(DHT.humidity, 4,1,Humidade); | |
generalTime=locUpTime; | |
} | |
dtostrf(Termistor(), 4,1,TemperaturraTermistor); | |
dtostrf(bitRead(PORTD,3), 2,0, Ar); | |
dtostrf(bitRead(PORTD,4), 2,0,isPorta); | |
sprintf(mensagem, "AR %s | PORTA %s" ,Ar, isPorta); | |
Agentuino.listen(); | |
locUpTime = millis()/1000; | |
dtostrf(locUpTime, 10,0,upTimeString); | |
if(!digitalRead(BOTAO_PIN)){ | |
lcd.clear(); | |
MostrarNoLCD(tela); | |
delay(500); | |
tela++; | |
if(tela>7) tela=1; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment