
ESP32-S3 board
The brain that runs your uploaded sketch.
TinySkiff ESP32-S3 Lab · Day 6 of 30
Today one light moves. You wire ten LED segments, each on its own pin, then upload a sketch that lights them one at a time down the bar and back — the first circuit where a list of pins and a single loop do the work of ten.
TSK-DAY06-LEDBAR
Hand this to an agent so it can pull the lesson packet and coach you step by step.
01 First, know the pieces
Six things, and ten of one of them. Tap Define on any part you haven't met — the answer opens as a field note you can read and dismiss without losing your place.

The brain that runs your uploaded sketch.

Spreads the pins into rows you can reach and label.

Ten small LEDs in one strip, each its own segment.

One in series with each segment to keep every current gentle.

Temporary, solder-free connections.

Uploads the sketch to the board.
02 Make the physical circuit
The official Freenove diagram is your chart — schematic on top, the same circuit built on a breadboard below. Click it to enlarge. Ten segments look like a lot, but each one is the same small connection repeated.
The bar can go in backwards. The LED bar's label direction is easy to reverse. If the whole bar stays dark once you upload, rotate it 180° in the breadboard and try again. Unplug USB before you move any wire.
03 One action at a time
This is the main path — you can finish the day without opening a single field note. Tap each step as you go to keep your place.
Seat the ESP32-S3 on the GPIO extension board and keep USB unplugged while you wire.
Place the LED bar across the breadboard's centre channel so each segment has its own row.
Wire each segment through its own 220 Ω resistor to its GPIO pin, working along the list in order.
Wire the bar's common row to ground so every segment shares the same return.
Compare every wire to the chart before you plug in USB.
Open Sketch_03.1_FlowingLight.ino in Arduino IDE and upload it.
Watch a single lit segment sweep along the bar and back.
04 Read just enough code
The sketch stays short even with ten LEDs, because the pins live in one list and a loop walks it. Switch to MicroPython if you'd rather see the same idea in Python — the wiring never changes.
byte ledPins[] = {21, 47, 48, 38, 39, 40, 41, 42, 2, 1};
int ledCounts;
void setup() {
ledCounts = sizeof(ledPins);
for (int i = 0; i < ledCounts; i++) {
pinMode(ledPins[i], OUTPUT);
}
}
void loop() {
for (int i = 0; i < ledCounts; i++) { // forward sweep
digitalWrite(ledPins[i], HIGH);
delay(100);
digitalWrite(ledPins[i], LOW);
}
for (int i = ledCounts - 1; i > -1; i--) { // reverse sweep
digitalWrite(ledPins[i], HIGH);
delay(100);
digitalWrite(ledPins[i], LOW);
}
}
byte ledPins[] = {21, 47, 48, 38, 39, 40, 41, 42, 2, 1}One list holds all ten pins in bar order, so the loop can reach each by number. digitalWrite(ledPins[i], HIGH)Lights whichever segment the loop is pointing at right now; the next line turns it off. for (int i = ledCounts - 1; i > -1; i--)Walks the same list backwards, which is what sends the light flowing back the other way. Optional side path · same circuit
pins = [21, 47, 48, 38, 39, 40, 41, 42, 2, 1]
while True:
for i in range(len(pins)):
led = Pin(pins[i], Pin.OUT)
led.value(1)
time.sleep_ms(100)
led.value(0)
pins = [21, 47, 48, 38, 39, 40, 41, 42, 2, 1]The same list of pins in Python, in the same bar order. led = Pin(pins[i], Pin.OUT)Picks one pin from the list and drives it, then the loop moves to the next.Same pins, same wiring. Run it in Thonny if MicroPython is set up; otherwise skip it — it should never block the Arduino-first path.
05 Understand, don't memorise
There's no trick here — the loop just points at one pin after another and lights whatever it's pointing at, faster than the eye separates.
All ten pins sit in one array in bar order.
The loop lights the pin it's pointing at right now.
It turns that one off and moves to the next pin.
A second loop walks the list in reverse so the light flows back.
one array of pins → walk it forward → walk it back → repeat
Ten separate variables would mean ten copies of every line. One array lets a single loop stand in for all of them.
06 Know it worked
Nothing prints to the screen today — the proof is the moving light on the bar.
Only one segment is lit at any instant — the flow is that single light moving, not a growing row.
07 Make the idea yours
Same working circuit, two small edits to the sketch. Both fit inside today's time and leave the wiring untouched.
Swap which loop runs first so the light starts its sweep from the other end. Predict which end it begins from before you upload.
Set every delay(100) to a larger or smaller number and upload. Find the speed where the flow still reads as a single moving light.
Logbook
08 Learn it with a hand on the tiller
Every lesson ships with a code and a machine-readable packet, so an agent can guide you with full context.
TSK-DAY06-LEDBAR
How the agent should behave: guide one segment at a time, wait for you to confirm, explain terms on request, and always check wiring, board, port, and USB before changing code.