
ESP32-S3 board
The brain that runs your sketch and sends the text.
ESP32-S3 Lab · Day 11 of 30
No wiring today. You upload a short sketch, open Serial Monitor, and the ESP32-S3 starts sending text up the same USB cable that carries your code — a start-up line first, then a running clock that ticks up every second. The same cable, now running text the other way, becomes your window into the program.
TSK-DAY11-SERIALPRINT
Hand this to an agent so it can pull the lesson packet and coach you step by step.
01 First, know the pieces
Almost nothing today — the board talks over the same USB cable that's already uploading your code. Tap Define on anything unfamiliar; the answer opens as a field note you can read and dismiss without losing your place.

The brain that runs your sketch and sends the text.

Uploads the sketch and opens Serial Monitor.

Sketch_07.1_SerialPrinter.ino
02 One action at a time
The whole day is upload, open the monitor, and read. Tap each step as you go to keep your place — you can finish without opening a single field note.
Plug the ESP32-S3 into your computer with a data-capable USB cable.
In Arduino IDE, select your ESP32-S3 board and the port it appears on.
Open Sketch_07.1_SerialPrinter.ino.
Press Upload and wait for the IDE to say Done uploading.
Open Serial Monitor and set the baud rate to 115200.
Watch the start-up line appear, then a running-time count that climbs every second.
03 Read just enough code
The whole sketch is short. Two lines in setup() open the link and announce the board is ready; the loop() prints a running-time line once a second. Switch to MicroPython if you'd rather see the same idea in Python.
void setup() {
Serial.begin(115200);
Serial.println("ESP32S3 initialization completed!");
}
void loop() {
Serial.printf("Running time : %.1f s\r\n", millis() / 1000.0f);
delay(1000);
}
Serial.begin(115200)Opens the USB serial link and sets its speed to 115200 baud — the same number Serial Monitor has to use, so both ends read the stream the same way. Serial.println("ESP32S3 initialization completed!")Sends one line of text up the cable, then moves to the next line — a start-up marker that proves the link is live before any real data flows. Serial.printf("Running time : %.1f s\r\n", millis() / 1000.0f)Slots a live value into a text template — one decimal place — and sends it, so a number inside the program becomes something you can read. Optional side path · no wiring
import time
print("ESP32S3 initialization completed!")
while True:
print("Running time : ", time.ticks_ms()/1000, "s")
time.sleep(1)
print("ESP32S3 initialization completed!")In MicroPython, print() sends text up the same USB serial link Thonny reads.time.ticks_ms()/1000Milliseconds since the board started, divided into seconds — the same running clock as the Arduino sketch.Same cable, no wiring. MicroPython's print() lands in Thonny's shell instead of Serial Monitor, but the idea is identical. If MicroPython isn't set up yet, skip this — it should never block the Arduino-first path.
04 Understand, don't memorise
On Day 2 the USB-to-serial bridge carried your code down onto the board. It runs both directions. Today the same wire carries text back up, so the board can report what it's actually doing. Everything before this you judged from the outside — a light on, a light off. From here you can ask the board directly, which is why serial is the single most useful debugging tool in the course.
One line puts the USB bridge into text mode and fixes its speed. Until this runs, the board has no voice.
Baud is bits per second, and both ends must use the same number. Serial Monitor set to 115200 reads the board's 115200 stream cleanly; a mismatch samples the wire at the wrong rate and prints garbage.
Each print pushes characters up the cable to your screen. printf slots a live value into a template first, so a number inside the program lands as readable text.
millis() rises with no light to show it. Printing it every second makes an internal value visible and live — the essence of debugging.
readable text needs board baud = monitor baud
The characters still arrive on the wire. Baud sets how often each side reads the signal, so a mismatched monitor samples between the real bits and reconstructs the wrong letters. The fix is always to match the number, never to resend.
When a later sketch misbehaves, a print of the suspect value tells you what the code truly saw — a sensor reading, a state, a counter — instead of guessing from an LED. Reach for a print before you rewrite anything.
05 Know it worked
Success and recovery sit side by side, so you never have to go hunting when something looks off.
The first line prints once at start-up; the running time then climbs by about one each second.
06 Make the idea yours
Printing earns its keep when it shows you something you could never see from the outside. Add a value the program has always held, then make the invisible obvious. No wiring, and it fits inside today's time.
Before setup(), add int count = 0;. Inside loop(), add count = count + 1; then Serial.println(count);. Re-upload. You're now watching a value that lived inside the program every run before this, invisible until you printed it.
Comment out delay(1000); and re-upload. The counter stops climbing once a second and races into the thousands — the board was always looping this fast, and printing is the only reason you can see it. That is debugging: making the code's real behaviour visible.
07 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-DAY11-SERIALPRINT
How the agent should behave: keep it to upload-and-read, check board, port, cable, and baud before touching code, and frame serial as the learner's main debugging tool — the way to see a value the program holds. Explain Serial.begin, println, and millis on request.
Keep your place
Mark it complete — it shows on your course map, and your place is saved on this device.