Multiple LEDs

Write code that turns multiple LEDs on and off- use the Copy and Paste functions to save time typing!


void setup() {

// initialize digital pin LED_BUILTIN as an output.

pinMode(12, OUTPUT);


pinMode(10, OUTPUT);


pinMode(3, OUTPUT);




}


// the loop function runs over and over again forever

void loop() {


digitalWrite(12, HIGH); // turn the LED on (HIGH is the voltage level)

delay(1000); // wait for a second

digitalWrite(12, LOW); // turn the LED off by making the voltage LOW

delay(1000); // wait for a second



digitalWrite(10, HIGH); // turn the LED on (HIGH is the voltage level)

delay(1000); // wait for a second

digitalWrite(10, LOW); // turn the LED off by making the voltage LOW

delay(1000); // wait for a second


digitalWrite(3, HIGH); // turn the LED on (HIGH is the voltage level)

delay(1000); // wait for a second

digitalWrite(3, LOW); // turn the LED off by making the voltage LOW

delay(1000); // wait for a second

}