Blink an LED¶
Make the board's built-in LED turn on for one second, then off for one second, forever.
Starter code¶
Open blink_starter in the Arduino IDE and fill in the TODOs.
blink_starter.ino
// Blink: turn the built-in LED on for one second, then off for one second, forever.
void setup() {
// TODO: set LED_BUILTIN as an output
}
void loop() {
// TODO: turn the LED on, wait 1 second, turn it off, wait 1 second
}
Solution
Try it¶
- Change the delays to make the LED blink faster.
- TODO: wire an external LED and resistor to pin 13.