Page 83 - PROYECTO INTEGRADOR_Neat
P. 83
}
void loop()
{
digitalWrite(tr,HIGH);
delay(1);
digitalWrite(tr,LOW);
t= pulseIn(e,HIGH);
d= t/58.2;
if(d<50){
lcd.clear();
digitalWrite(12,HIGH);
digitalWrite(11,HIGH);
digitalWrite(10,HIGH);
lcd.setCursor(5,0);
lcd.print("VERDE ON");
delay(1000);
}
else if(d<100){
lcd.clear();
digitalWrite(11,HIGH);
digitalWrite(10,HIGH);
digitalWrite(12,LOW);