
ESP32-S3 board
The brain that runs your uploaded sketch.
TinySkiff ESP32-S3 Lab · Day 14 of 30
Today your own fingertip becomes the switch. One bare jumper on GPIO 14 acts as a touch pad, and the sketch watches the tiny charge your skin adds to it — one tap flips the LED on, the next tap flips it off.
TSK-DAY14-TOUCH
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 one of them doubles as the sensor. 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 lamp you'll flip with a tap — it only works one way round.

Sits in series with the LED to keep the current gentle.

Two carry the LED circuit; the third sits alone on GPIO 14 with its free end bare — that tip is the touch pad.

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. The touch pad is the simplest sensor of the whole course — a single jumper with a bare end.
Keep the touch wire to itself. The free end of the GPIO 14 jumper is for your skin only — keep it clear of 3.3V, 5V, and every other pin. 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 so its long leg (+) is on the GPIO 21 side and its short leg (−) heads toward ground.
Put the 220 Ω resistor in series between GPIO 21 and the LED's long leg.
Push one end of a jumper into GPIO 14 and leave its other end free in the air — that bare metal tip is your touch pad.
Compare every wire to the chart, then plug in USB.
Open Sketch_09.1_TouchRead.ino first, upload it, and open Serial Monitor at 115200 — note the reading when the wire is alone and when you pinch its bare tip.
Open Sketch_09.2_TouchLamp.ino and upload it.
Tap the bare tip — the LED flips on. Tap again — it flips off.
04 Read just enough code
Two sketches today. Sketch_09.1_TouchRead.ino is the calibration tool — it prints the raw touch reading once a second so you can see your own numbers. The lamp itself is 9.2, shown below — two thresholds, a remembered flag, and a tiny helper that flips the LED.
#define PIN_LED 21
#define PRESS_VAL 200000 //Set a threshold to judge touch
#define RELEASE_VAL 60000 //Set a threshold to judge release
bool isProcessed = false;
void setup() {
Serial.begin(115200);
pinMode(PIN_LED, OUTPUT);
}
void loop() {
if (touchRead(T14) > PRESS_VAL) {
if (!isProcessed) {
isProcessed = true;
Serial.println("Touch detected! ");
reverseGPIO(PIN_LED);
}
}
if (touchRead(T14) < RELEASE_VAL) {
if (isProcessed) {
isProcessed = false;
Serial.println("Released! ");
}
}
}
void reverseGPIO(int pin) {
digitalWrite(pin, !digitalRead(pin));
}
touchRead(T14)Measures the charge on touch pin T14, which is GPIO 14 — your fingertip drives this number far higher. touchRead(T14) > PRESS_VALOn this board a reading above 200000 counts as a touch; a reading below 60000 counts as a release. bool isProcessedRemembers that the current touch has already been handled, so one tap flips the lamp exactly once. digitalWrite(pin, !digitalRead(pin))Reads the LED pin's current state and writes the opposite — the flip itself. 05 Understand, don't memorise
Your skin holds a small electric charge, and pressing it against the bare wire lets the pin feel that extra capacitance as a bigger number. The rest is bookkeeping the sketch does for you.
The pin measures how much charge the bare wire is soaking up.
Above 200000 counts as a touch and below 60000 counts as a release.
A flag makes sure each touch flips the lamp exactly once.
reverseGPIO reads the LED pin and writes the opposite state.
touch raises the reading — above 200000 is a press and below 60000 is a release
Idle, the pin reads in the tens of thousands; a firm touch climbs past 200000. Older ESP32 chips reported touch as a drop toward zero, and some reference text still describes that behaviour — on your S3, trust the thresholds in the sketch.
The isProcessed flag plays the role debounce played on Day 5 — it holds the memory of one press so a long touch counts as a single tap.
06 Know it worked
The Serial Monitor is your calibration tool today — the proof is the LED answering your fingertip.
This lamp latches — the LED holds its state between taps, with your fingertip doing the whole job of a button.
07 Make the idea yours
Same working circuit, two numbers to make your own. The stock thresholds fit most hands; yours deserve a proper fit. It sits inside today's 25 minutes.
Upload Sketch_09.1_TouchRead.ino again and write down two values — the reading with the wire alone and the reading with your fingertip pinching the bare tip. Set PRESS_VAL a little under your touched value and RELEASE_VAL a little over your idle value, then re-upload the lamp.
Raise PRESS_VAL step by step until a light brush does nothing and only a firm, deliberate grip flips the lamp. You've just designed how the switch should feel.
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-DAY14-TOUCH
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.