Devices & Components
Arduino Uno Rev3
Breadboard (generic)
Resistor 220 ohm
LED (generic)
Jumper wires (generic)
Software & Tools
Arduino IDE
Project description
Code
The Code for the project
c_cpp
Created entirely be me.
1int DELAY = 2000; 2 3void setup() { 4 5//Sets Digital Pins 6pinMode (8, OUTPUT); //RED 7pinMode (9, OUTPUT); //YELLOW 8pinMode (10, OUTPUT); //GREEN 9 10//Turns OFF all LEDs 11digitalWrite (8, LOW); 12digitalWrite (9, LOW); 13digitalWrite (10, LOW); 14} 15 16void loop() { 17 18//RED LED 19digitalWrite (8, HIGH); 20delay(DELAY); 21digitalWrite (8, LOW); 22 23//YELLOW LED 24digitalWrite (9, HIGH); 25delay(DELAY); 26digitalWrite (9, LOW); 27 28//GREEN LED 29digitalWrite (10, HIGH); 30delay(DELAY); 31digitalWrite (10, LOW); 32 33 34 35}
The Code for the project
c_cpp
Created entirely be me.
1int DELAY = 2000; 2 3void setup() { 4 5//Sets Digital Pins 6pinMode 7 (8, OUTPUT); //RED 8pinMode (9, OUTPUT); //YELLOW 9pinMode (10, OUTPUT); //GREEN 10 11//Turns 12 OFF all LEDs 13digitalWrite (8, LOW); 14digitalWrite (9, LOW); 15digitalWrite 16 (10, LOW); 17} 18 19void loop() { 20 21//RED LED 22digitalWrite (8, HIGH); 23delay(DELAY); 24digitalWrite 25 (8, LOW); 26 27//YELLOW LED 28digitalWrite (9, HIGH); 29delay(DELAY); 30digitalWrite 31 (9, LOW); 32 33//GREEN LED 34digitalWrite (10, HIGH); 35delay(DELAY); 36digitalWrite 37 (10, LOW); 38 39 40 41}
Downloadable files
Diagram for the wiring.
Diagram for the wiring.

Diagram for the wiring.
Diagram for the wiring.

Schematics
Schematics

Comments
Only logged in users can leave comments