ESP32-S3 Lab · Day 3 of 30

Prove the whole chain
with one blink

No wiring today. You upload five short lines and the board's own tiny LED starts blinking — the smallest possible proof that everything from your keyboard to the chip is connected and listening. Then we read those five lines, because they carry the two ideas behind almost every program on this board — run once, then repeat forever, driving a pin between 3.3V and 0V.

About 20 minutesUpload and watchNo wiring todayRead the five lines
Agent assist code TSK-DAY03-BLINK

Hand this to an agent so it can pull the lesson packet and coach you step by step.

01 First, know the pieces

What you need

Almost nothing today — the LED you'll blink is already on the board. Tap Define on anything unfamiliar; the answer opens as a field note.

Official manual photo of the ESP32-S3 development board.
Manual photo

ESP32-S3 board

The board — and the small onboard LED you'll blink.

Official manual screenshot of the Arduino IDE interface.
Manual screenshot

Arduino IDE

Opens the sketch, uploads it, and reports "Done uploading."

Official manual page showing an Arduino Blink sketch.
Manual sketch

Official sketch

Sketch_01.1_Blink.ino

02 One action at a time

Build it

The whole day is upload-and-watch. Tap each step as you go to keep your place — you can finish without opening a single field note.

0 / 5 done
  1. Plug the ESP32-S3 into your computer with a data-capable USB-C cable.

  2. In Arduino IDE, select your ESP32-S3 board and the port it appears on.

  3. Open Sketch_01.1_Blink.ino.

  4. Press Upload and wait for the IDE to say Done uploading.

  5. Watch the small onboard LED near the chip start to blink.

It's alive.

Your code is running on the board. Every later day starts from this exact upload-and-watch loop.

03 Read just enough code

Read the code

Five short lines. Two of them run once to get ready; three of them repeat forever. That's the shape of nearly every Arduino sketch.

Sketch_01.1_Blink.ino
#define LED_BUILTIN 2

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // on
  delay(1000);                       // wait 1 second
  digitalWrite(LED_BUILTIN, LOW);    // off
  delay(1000);                       // wait 1 second
}
#define LED_BUILTIN 2Names the onboard LED's pin so the rest of the sketch reads plainly.
pinMode(LED_BUILTIN, OUTPUT)Runs once in setup() to say this pin will push signal out.
digitalWrite(LED_BUILTIN, HIGH)Puts 3.3V on the pin so the LED lights; LOW puts 0V and it goes dark.
delay(1000)Freezes the whole program for one second so the pin holds its state before the next line.

04 Understand, don't memorise

The two-function loop, and what a pin actually does

Five lines, but they carry the shape of almost every program you'll write on this board. Two ideas do the real work- a sketch has one part that runs once and one part that repeats forever, and driving a pin HIGH or LOW is literally switching 3.3 volts onto a physical wire and off again.

1

setup() runs once

The instant the board gets power or is reset, setup() runs a single time. Here it prepares the pin as an output — then it never runs again.

2

loop() runs forever

When loop() reaches its last line, the board jumps straight back to the top and runs it again. With no operating system waiting underneath, repeating loop() is the only thing the chip does.

3

HIGH is 3.3 volts

digitalWrite(pin, HIGH) puts 3.3V onto that physical pin; LOW puts 0V. The LED lights because real voltage now sits on its wire — the same 3.3V logic you met on Day 1.

4

delay() freezes everything

delay(1000) stops the whole program for one second. The board holds the pin where it is because every other line is frozen too — the count has to finish before anything else can run.

The shape setup() onceloop() forever → each pass drives the pin to 3.3V or 0V

HIGH is literally 3.3 volts

digitalWrite(pin, HIGH) connects the pin to the board's 3.3V rail; LOW connects it to 0V. The LED responds to that real voltage — the same 3.3V logic that decides what a pin can safely take in later on.

setup() once, loop() forever

Anything that only needs doing at the start — preparing a pin, opening the serial port — belongs in setup(). Anything that should keep happening lives in loop(), which the board runs end to end and then restarts, with no pause between passes unless you add one.

Why delay() is a real limitation

While delay() counts, the processor can do nothing else — it can't read a button or drive a second LED on its own rhythm. A plain blink doesn't mind. Later days swap delay() for a running clock the program checks, so it can keep several things going at once.

05 Know it worked

Test & debug

Nothing prints to the screen today — the proof is on the board itself.

What you should see
Onboard LED
  • The small onboard LED turns on for one second.
  • Then off for one second.
  • Then it repeats, steady, for as long as the board has power.

The larger LED that stays lit is the power light — look for the smaller one that blinks.

If it doesn't
  • Nothing blinks? Confirm the right board and port are selected, then upload again.
  • No `Done uploading`? Try a different USB-C cable — some are charge-only and carry no data.
  • One LED glows steady? That's the power LED. The blink is a second, smaller LED near the chip.

06 Make the idea yours

Try this: blink faster than your eye

The same five lines, driven fast, reveal as much about your own eyes as about the board. Speed the blink up far enough and on-off-on-off stops looking like blinking and fuses into a single steady light — the effect every screen and dimmable bulb leans on.

Halve it, then halve again

Change both delay(1000) lines to delay(500), upload, and watch. Then 250, then 120, then 60, re-uploading each time. The blink gets visibly faster at every step.

Watch it fuse to steady

At about delay(5) or below, your eye stops resolving separate blinks and reads one continuous, slightly dim light. The LED is still going fully on then fully off — you're watching persistence of vision, the trick that makes a fast flicker look solid.

07 Learn it with a hand on the tiller

Coach me through it

Every lesson ships with a code and a machine-readable packet, so an agent can guide you with full context.

Lesson code

TSK-DAY03-BLINK

How the agent should behave: keep it to upload-and-watch and check board, port, and cable before touching code. Once it blinks, teach the two-function shape — setup() once, loop() forever — and that digitalWrite puts 3.3V or 0V on the pin while delay() blocks the whole program as it counts.

Keep your place

Finished Day 3?

Mark it complete — it shows on your course map, and your place is saved on this device.

Field note

Shortcut

Prompt copied