What my circuit looks like:
The schematic drawing of my circuit:
Arduino Code:
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin 10 as an output.
pinMode(10, OUTPUT);
// initialize digital pin 11 as an output.
pinMode(11, OUTPUT);
// initialize digital pin 12 as an output.
pinMode(12, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
// turn the LED on (HIGH is the voltage level
digitalWrite(10, HIGH);
// wait for a second
delay(1000);
// turn the LED off by making the voltage LOW
digitalWrite(10, LOW);
// wait for a second
delay(1000);
// turn the LED on (HIGH is the voltage level
digitalWrite(11, HIGH);
// wait for a second
delay(1000);
// turn the LED off by making the voltage LOW
digitalWrite(11, LOW);
// wait for a second
delay(1000);
// turn the LED on (HIGH is the voltage level
digitalWrite(10, HIGH);
// wait for a second
delay(1000);
// turn the LED off by making the voltage LOW
digitalWrite(10, LOW);
// wait for a second
delay(1000);
}
An animted gif of my circuit: