Activity C3 — Digital outputs


Level 3 — Use two digital outputs at once
Complete the challenge
When you have done the copy and paste, your entire setup()
function should look like this:
void setup() {
pinMode(11, OUTPUT); // set up pin 11 as an output.
pinMode(11, OUTPUT); // set up pin 12 as an output.
}
When you have changed the pin number, your entire setup()
function should look like this:
void setup() {
pinMode(11, OUTPUT); // set up pin 11 as an output.
pinMode(12, OUTPUT); // set up pin 12 as an output.
}
When you have done the copy and paste, your entire loop()
function should look like this:
void loop() {
digitalWrite(11, HIGH); // turn the LED on
digitalWrite(11, HIGH); // turn the LED on
delay(100); // wait for 1 tenth second
digitalWrite(11, LOW); // turn the LED off
digitalWrite(11, LOW); // turn the LED off
delay(1000); // wait for 1 second
}
When you have changed the pin numbers, your entire loop()
function should look like this:
void loop() {
digitalWrite(11, HIGH); // turn the LED on
digitalWrite(12, HIGH); // turn the LED on
delay(100); // wait for 1 tenth second
digitalWrite(11, LOW); // turn the LED off
digitalWrite(12, LOW); // turn the LED off
delay(1000); // wait for 1 second
}