
ESP32-S3 board
The brain that runs your uploaded sketch.
TinySkiff ESP32-S3 Lab · Day 18 of 30
Today you build a thermometer. A thermistor changes its resistance as the air around it warms or cools, and the ESP32-S3 reads that change and prints the temperature once a second. Pinch the little bead and watch the number climb — the same sensing that tells a skipper the engine room is running warm.
TSK-DAY18-THERMOMETER
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, nothing more. 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.

A small bead whose resistance falls as it warms — today's sensor.

The steady half of the divider that turns resistance into voltage.

Temporary, solder-free connections.

Uploads code and opens Serial Monitor.
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. Two parts in a line make the divider; one wire taps its midpoint.
Check before power. The thermistor has no polarity — either leg can face either way — but the midpoint wire must land on GPIO 1. 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.
Push the thermistor into the breadboard with its two legs in separate rows.
Place the 10 kΩ resistor so one leg shares a row with one thermistor leg — that shared row is the divider's midpoint.
Run a jumper from 3.3V to the resistor's free leg.
Run a jumper from the midpoint row to GPIO 1.
Run a jumper from the thermistor's free leg to GND.
Compare every wire to the chart, then plug in USB.
Open Sketch_12.1_Thermometer.ino in Arduino IDE and upload it.
Open Serial Monitor and set the baud rate to 115200.
Pinch the thermistor's bead between two fingers and watch the temperature climb.
04 Read just enough code
The whole loop is four working lines — a chain that walks from a raw ADC count to volts, to ohms, to degrees. Switch to MicroPython if you'd rather see the same chain in Python; the wiring never changes.
#define PIN_ANALOG_IN 1
void setup() {
Serial.begin(115200);
}
void loop() {
int adcValue = analogRead(PIN_ANALOG_IN); //read ADC pin
double voltage = (float)adcValue / 4095.0 * 3.3; // calculate voltage
double Rt = 10 * voltage / (3.3 - voltage); //calculate resistance value of thermistor
double tempK = 1 / (1 / (273.15 + 25) + log(Rt / 10) / 3950.0); //calculate temperature (Kelvin)
double tempC = tempK - 273.15; //calculate temperature (Celsius)
Serial.printf("ADC value : %d,\tVoltage : %.2fV, \tTemperature : %.2fC\n", adcValue, voltage, tempC);
delay(1000);
}
analogRead(PIN_ANALOG_IN)Reads the divider midpoint on GPIO 1 as a number from 0 to 4095. double Rt = 10 * voltage / (3.3 - voltage)Works the divider maths backwards to recover the thermistor's resistance in kilo-ohms. log(Rt / 10) / 3950.0The B-equation — B is 3950 for this bead — maps that resistance onto temperature in Kelvin; subtracting 273.15 lands it in Celsius. Optional side path · same circuit
adc=ADC(Pin(1))
adc.atten(ADC.ATTN_11DB)
adc.width(ADC.WIDTH_12BIT)
adcValue=adc.read()
voltage=adcValue/4095*3.3
Rt=10*voltage/(3.3-voltage)
tempK=(1/(1/(273.15+25)+(math.log(Rt/10))/3950))
tempC=tempK-273.15
adc.atten(ADC.ATTN_11DB)Opens the pin to the full 0–3.3 V range so the divider's whole swing is readable.Rt=10*voltage/(3.3-voltage)The same divider arithmetic as the Arduino sketch — volts back into kilo-ohms.Same pin, same maths, same printout. Run it in Thonny and compare the temperature with the Arduino version. If MicroPython isn't set up yet, skip this — it should never block the Arduino-first day.
05 Understand, don't memorise
The sketch walks one chain, once a second. Each line hands its answer to the next — count to volts, volts to ohms, ohms to degrees.
analogRead samples the midpoint and returns a count from 0 to 4095.
Dividing by 4095 and scaling by 3.3 gives the real voltage at the pin.
The divider maths recovers the thermistor's resistance from that voltage.
The B-equation with B 3950 turns resistance into Kelvin and then Celsius.
ADC count → volts → ohms → degrees
A thermistor is made of a material whose electrons flow more freely as it warms, so its resistance drops as temperature rises. At 25 °C this bead sits near 10 kΩ.
The ADC measures voltage. Stacking the fixed resistor above the thermistor makes a divider whose midpoint voltage tracks the changing resistance — the translation the pin can actually read.
06 Know it worked
Success and recovery sit side by side, so you never have to go hunting when something looks off.
A steady room line first — somewhere around 20 to 26 °C. Pinch the bead and the temperature climbs a few degrees; let go and it eases back down.
07 Make the idea yours
Same working circuit, one new habit: treating a live number as data worth recording. It fits inside today's 25 minutes.
Note the room reading when you start the day and again after dark. A degree or two of drift is real weather moving through your space.
Add double tempF = tempC * 1.8 + 32; after the Celsius line and print it too — one more field in the printf.
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-DAY18-THERMOMETER
How the agent should behave: guide one physical connection at a time, wait for you to confirm, read the printed numbers to diagnose the divider, and always check wiring, board, port, and USB before changing code.