Your First Sketch: Blink an LED
Write and upload your very first program from scratch — three lines of setup, three lines of loop, one blinking LED.
You'll need: just the Arduino Uno board and a USB cable — the board's built-in "L" LED (wired to pin 13) means no external components are required for this first sketch.
Rather than opening the pre-made example, type this out yourself — typing code by hand, even simple code, builds far more familiarity than clicking through a menu:
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
Reading it against Lesson 3's skeleton: setup() runs pinMode(13, OUTPUT) once, telling the board that pin 13 will be used to send a signal out, rather than read one in. Then loop() repeats forever: turn pin 13 HIGH, wait 1000 milliseconds (one second, via delay()), turn it LOW, wait another second, and repeat.
Click Upload. After a few seconds of compiling and transferring, the onboard LED marked "L" should start blinking on and off, once per second — the same pattern you just wrote.
Once it's working, try changing the two 1000 values to 200 and re-uploading — a small, safe change that confirms you understand which numbers control the timing before moving on to wiring anything external.