
ESP32-S3 board
The brain that runs your uploaded sketch.
TinySkiff ESP32-S3 Lab · Day 20 of 30
Today a chip joins the crew. You feed a 74HC595 one byte over three wires — data, clock, latch — and it fans those eight bits out to the LED bar all at once. The flowing light you built on Day 6 took ten GPIOs; today's takes three.
TSK-DAY20-SHIFTREG
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, one of them a chip with sixteen legs. 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.

The chip that turns three wires into eight outputs.

The bar from Day 6 — eight of its segments light today.

One per segment to keep each LED's current gentle.

Temporary, solder-free connections — the most you've used so far.
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. The chip sits across the breadboard's centre channel, and each connection tells you where the wire goes and why.
Mind the chip's notch. The 74HC595 only works one way round — the half-moon notch at one end marks where pin 1 sits, and it must match the chart. 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.
Straddle the 74HC595 across the breadboard's centre channel with its notch matching the chart.
Give the chip power — VCC and MR (pin 10) to 5V, GND and OE (pin 13) to ground.
Run the three control wires — GPIO 12 to DS (pin 14), GPIO 13 to ST_CP (pin 12), GPIO 14 to SH_CP (pin 11).
Connect outputs Q0–Q7 to the LED bar, with a 220 Ω resistor in series for each segment.
Check the LED bar's direction against the chart — you saw on Day 6 how easily it reverses.
Compare every wire to the chart before you plug in USB.
Open Sketch_14.1_FlowingLight02.ino in Arduino IDE and upload it.
Watch one lit LED run along the bar and back.
04 Read just enough code
The sketch keeps one byte, x, and lets its single 1 bit slide left and then right. A small helper, writeTo595, hands each new byte to the chip and latches it onto the outputs. Switch to MicroPython if you'd rather see the same idea in Python — the wiring never changes.
int latchPin = 13; // Pin connected to ST_CP of 74HC595(Pin12)
int clockPin = 14; // Pin connected to SH_CP of 74HC595(Pin11)
int dataPin = 12; // Pin connected to DS of 74HC595(Pin14)
void setup() {
// set pins to output
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
}
void loop() {
byte x = 0x01; // 0b 0000 0001
for (int j = 0; j < 8; j++) { // Let led light up from right to left
writeTo595(LSBFIRST, x);
x <<= 1;
delay(50);
}
delay(100);
x = 0x80; //0b 1000 0000
for (int j = 0; j < 8; j++) { // Let led light up from left to right
writeTo595(LSBFIRST, x);
x >>= 1;
delay(50);
}
delay(100);
}
void writeTo595(int order, byte _data ) {
// Output low level to latchPin
digitalWrite(latchPin, LOW);
// Send serial data to 74HC595
shiftOut(dataPin, clockPin, order, _data);
// Output high level to latchPin, and 74HC595 will update the data to the parallel output port.
digitalWrite(latchPin, HIGH);
}
shiftOut(dataPin, clockPin, order, _data)Sends the byte to the chip one bit at a time — data on GPIO 12, a clock tick on GPIO 14 for each bit. digitalWrite(latchPin, HIGH)The rising edge on GPIO 13 moves all eight stored bits to the outputs in one step. x <<= 1Slides the single 1 bit one place left, so the lit LED takes one step along the bar; delay(50) sets the pace. Optional side path · same circuit
import time
from my74HC595 import Chip74HC595
chip = Chip74HC595(12,13,14,-1)
while True:
x=0x01
for count in range(8):
chip.shiftOut(1,x)
x=x<<1;
time.sleep_ms(300)
x=0x01
for count in range(8):
chip.shiftOut(0,x)
x=x<<1
time.sleep_ms(300)
Chip74HC595(12,13,14,-1)The module takes its pins in the order data then latch then clock — matching today's wiring — with -1 meaning OE is simply wired to ground.chip.shiftOut(1,x)Sends the byte and latches it in one call; the first argument picks which direction the pattern travels.Same wiring, same chip. Here the direction of travel comes from shiftOut's first argument — 1 one way, 0 the other — while both loops shift the byte the same way. 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
The chip is a small memory with eight outputs. Watch what the three wires each do, and the moving light explains itself.
Each clock tick pushes the next bit of the byte into the chip.
A rising edge on the latch pin presents all eight bits at once.
Q0 through Q7 each drive one segment of the bar.
x <<= 1 slides the lit bit along and the light follows it.
eight outputs = one byte carried over three wires
Day 6 gave every segment its own GPIO in a pin array. Today the chip holds all eight states, and the board keeps just three wires — data, clock, and latch.
While bits are still arriving, the outputs hold their previous pattern. The latch edge updates them all in one clean step, so you never see half a byte on the bar.
06 Know it worked
Nothing prints to the screen today — the proof is the light running along the bar in front of you.
Eight segments take part — the chip has eight outputs, so two segments of the ten-segment bar stay dark. That's correct.
07 Make the idea yours
Same working circuit, one variable to play with: the byte x. Everything the bar does comes from how you shape and shift it. It fits inside today's 30 minutes.
Change both delay(50) lines together — try 20 for a sprint, 150 for a stroll — and upload until the flow feels right.
Start the first loop with x = 0x03 so two neighbouring LEDs travel together. Predict what the second loop's starting value needs to be before you change it.
In the first loop, replace x <<= 1 with x = (x << 1) | 1 so each step keeps every light already lit and the bar fills from one end.
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-DAY20-SHIFTREG
How the agent should behave: guide one physical connection at a time, wait for you to confirm, explain terms on request, and always check wiring, board, port, and USB before changing code.