Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define LED 5 // LED no port 5 HIGH = ligado
- #define Entrada A0 // Entrada analógica
- unsigned int Valor = 0;
- //----------------------------------------------
- void setup()
- {
- pinMode(LED,OUTPUT); // LED como saída
- digitalWrite(LED , LOW); // HIGH LED desligado
- }
- //----------------------------------------------
- void loop()
- {
- Valor = analogRead(Entrada);
- if (Valor > 1000)
- {
- for (int i = 0; i <3; i++)
- {
- digitalWrite(LED, HIGH);
- delay(300);
- digitalWrite(LED, LOW);
- delay(300);
- }
- delay(178200);
- // delay(2000); // Valor para teste
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement