Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define BUTTON 2
- #define LED 3
- void setup() {
- pinMode(BUTTON, INPUT);
- pinMode(LED, OUTPUT);
- }
- void loop() {
- int button = digitalRead(BUTTON);
- if (button == HIGH){
- for (int i = 0; i < 10; i++){
- digitalWrite(LED, HIGH);
- delay(1000);
- digitalWrite(LED, LOW);
- delay(2000);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement