Toll-Free Customer Support 24/7

DIY UNO Play Breadboard -ATMEGA328P with FT232 Breakout Board

/*
Blink sequence
Turns ON and OFF 4 LED's in a sequence
*/
// Pin 0,1,7,8 are connected to LED's
// Please Note:

int led1 = 0;
int led2 = 1;

int led3 = 7;
int led4 = 8;

// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pins as output's.
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);
digitalWrite(led1, LOW);
digitalWrite(led2, LOW);
digitalWrite(led3, LOW);
digitalWrite(led4, LOW);
delay(1000); // wait for a second
}

// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led1, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led1, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
digitalWrite(led2, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
digitalWrite(led3, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
digitalWrite(led4, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

Back to top