Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define LED 2
- #define SW 12
- //--------------------------------------
- void setup()
- {
- pinMode(SW, INPUT_PULLUP);
- pinMode(LED, OUTPUT);
- digitalWrite(LED, HIGH);
- }
- //--------------------------------------
- void loop()
- {
- if (digitalRead(SW) == 0)
- {
- delay(30);
- if (digitalRead(SW) == 0)
- {
- digitalWrite(LED, LOW);
- delay(1000);
- digitalWrite(LED, HIGH);
- delay(1000);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement