Page 94 - PROYECTO INTEGRADOR
P. 94

}



                  void loop()


                  {

                   g = analogRead(A0);



                    if(g<307){


                      digitalWrite(8,HIGH);

                      digitalWrite(9,LOW);

                      digitalWrite(10,LOW);

                      lcd.setCursor(0,0);

                      lcd.print("FUERA DE PELIGRO ");


                      delay(200);

                    }else if(g>500){

                      lcd.clear();

                      digitalWrite(8,LOW);


                      digitalWrite(9,LOW);

                      digitalWrite(10,HIGH);

                      lcd.setCursor(4,0);

                      lcd.print("PELIGRO");


                      delay(200);

                    }else if(g>306){

                      lcd.clear();

                      digitalWrite(8,LOW);

                      digitalWrite(9,HIGH);


                      digitalWrite(10,LOW);

                      lcd.setCursor(2,0);
   89   90   91   92   93   94   95   96   97   98   99