0% found this document useful (0 votes)
13 views1 page

Int Int Int Int Int Int Int Void: // Added Missing Semicolon

The document contains an Arduino sketch that controls six LEDs connected to pins 2 through 7. Each LED is turned on and off in sequence with a delay of 500 milliseconds between actions. The setup function initializes the pins as outputs, while the loop function manages the LED states.

Uploaded by

Renata Choque
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views1 page

Int Int Int Int Int Int Int Void: // Added Missing Semicolon

The document contains an Arduino sketch that controls six LEDs connected to pins 2 through 7. Each LED is turned on and off in sequence with a delay of 500 milliseconds between actions. The setup function initializes the pins as outputs, while the loop function manages the LED states.

Uploaded by

Renata Choque
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

int Led1 = 2;

int Led2 = 3;
int Led3 = 4;
int Led4 = 5;
int Led5 = 6;
int Led6 = 7;
int time = 500; // Added missing semicolon

void setup() {
pinMode(Led1, OUTPUT);
pinMode(Led2, OUTPUT);
pinMode(Led3, OUTPUT);
pinMode(Led4, OUTPUT);
pinMode(Led5, OUTPUT);
pinMode(Led6, OUTPUT);
}

void loop() {
digitalWrite(Led1, HIGH);
delay(time);
digitalWrite(Led1, LOW);
delay(time);

digitalWrite(Led2, HIGH);
delay(time);
digitalWrite(Led2, LOW); // Fixed typo here
delay(time);

digitalWrite(Led3, HIGH);
delay(time);
digitalWrite(Led3, LOW);
delay(time);

digitalWrite(Led4, HIGH);
delay(time);
digitalWrite(Led4, LOW);
delay(time);

digitalWrite(Led5, HIGH);
delay(time);
digitalWrite(Led5, LOW);
delay(time);

digitalWrite(Led6, HIGH);
delay(time);
digitalWrite(Led6, LOW);
delay(time);
}

You might also like