Skip to content

Commit 9ad8748

Browse files
committed
Updated Blink
removed the variable “led” and added some additional descriptive text
1 parent cf5fc14 commit 9ad8748

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
/*
22
Blink
33
Turns on an LED on for one second, then off for one second, repeatedly.
4-
4+
5+
Most Arduinos have an on-board LED you can control. On the Uno and
6+
Leonardo, it is attached to digital pin 13. If you're unsure what
7+
pin the on-board LED is connected to on your Arduino model, check
8+
the documentation at http://arduino.cc
9+
510
This example code is in the public domain.
11+
12+
modified 8 May 2014
13+
by Scott Fitzgerald
614
*/
7-
8-
// Pin 13 has an LED connected on most Arduino boards.
9-
// give it a name:
10-
int led = 13;
1115

12-
// the setup routine runs once when you press reset:
13-
void setup() {
14-
// initialize the digital pin as an output.
15-
pinMode(led, OUTPUT);
16+
17+
// the setup function runs once when you press reset or power the board
18+
void setup() {
19+
// initialize digital pin 13 as an output.
20+
pinMode(13, OUTPUT);
1621
}
1722

18-
// the loop routine runs over and over again forever:
23+
// the loop function runs over and over again forever
1924
void loop() {
20-
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
21-
delay(1000); // wait for a second
22-
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
23-
delay(1000); // wait for a second
25+
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
26+
delay(1000); // wait for a second
27+
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
28+
delay(1000); // wait for a second
2429
}

0 commit comments

Comments
 (0)