Devices & Components
1
Arduino Mega 2560 Rev3
1
Resistor 221 ohm
1
Jumper wires (generic)
1
LED (generic)
Project description
Code
SOFTWARE
c_cpp
Downloadable files
SHEMATIC
SHEMATIC

SHEMATIC
SHEMATIC

Comments
Only logged in users can leave comments
Devices & Components
Arduino Mega 2560 Rev3
Resistor 221 ohm
Jumper wires (generic)
LED (generic)
Project description
Code
SOFTWARE
c_cpp
1/* 2 Blinking LEDs - test program to run 3 LEDs in a pattern of blinks 3*/ 4 5int yellowled = 12; 6int greenled = 10; 7int blueled = 7; 8 9// the setup routine runs once when you press reset: 10void setup() { 11 // initialize the digital pin as an output. 12 pinMode(yellowled, OUTPUT); 13 pinMode(greenled, OUTPUT); 14 pinMode(blueled, OUTPUT); 15} 16 17// the loop routine runs over and over again forever: 18void loop() { 19 digitalWrite(yellowled, HIGH); // turn the LED on (HIGH is the voltage level) 20 delay(80); // wait for 1/2 a second 21 digitalWrite(yellowled, LOW); // turn the LED off by making the voltage LOW 22 digitalWrite(greenled, HIGH); // turn the LED on (HIGH is the voltage level) 23 delay(80); // wait for 1/2 a second 24 digitalWrite(greenled, LOW); // turn the LED off by making the voltage LOW 25 digitalWrite(blueled, HIGH); // turn the LED on (HIGH is the voltage level) 26 delay(80); // wait for 1/2 a second 27 digitalWrite(blueled, LOW); // turn the LED off by making the voltage LOW 28 delay(500); // wait for a second 29}
Downloadable files
SHEMATIC
SHEMATIC

SHEMATIC
SHEMATIC

Comments
Only logged in users can leave comments