const int LED1 = 0; const int LED2 = 26; const int LED3 = 1; const int Switch = 27; // the setup function runs once when you press reset or power the board void setup() { // initialize digital pin LED_BUILTIN as an output. Serial.begin(9600); pinMode(LED1, OUTPUT); pinMode(LED2, OUTPUT); pinMode(LED3, OUTPUT); pinMode(Switch, INPUT); } // the loop function runs over and over again forever void loop() { int SW = digitalRead(Switch); Serial.println(SW); if (SW == 1) { digitalWrite(27, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(0, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(26, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(1, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(0, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second digitalWrite(26, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second digitalWrite(1, LOW); // turn the LED off by making the voltage LOW delay(1000); } // wait for a second }