
ESP32-S3 board
Now it reads your input as well as printing its own.
TinySkiff ESP32-S3 Lab · Day 12 of 30
Yesterday the board only talked. Today it listens. You upload a short sketch, type a message into Serial Monitor, and the ESP32-S3 reads what you sent and sends it right back — the same USB cable now carrying words in both directions.
TSK-DAY12-SERIALRW
Hand this to an agent so it can pull the lesson packet and coach you step by step.
01 First, know the pieces
The same three things as yesterday — nothing to wire. Tap Define on anything unfamiliar; the answer opens as a field note you can read and dismiss without losing your place.

Now it reads your input as well as printing its own.

Serial Monitor's input box is how you type to the board.

Sketch_07.2_SerialRW.ino
02 One action at a time
The whole day is upload, type, and read the reply. 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.2_SerialRW.ino.
Press Upload and wait for the IDE to say Done uploading.
Open Serial Monitor, set the baud rate to 115200, and set the line ending to Newline.
Type a word into the input box, press Enter, and watch the board echo it back.
03 Read just enough code
The sketch waits for you. When characters arrive it collects them into one message, tidies the ends, and prints that message back. Switch to MicroPython if you'd rather see the same idea in Python.
void loop() {
if (Serial.available()) {
inputString = Serial.readStringUntil('\n');
inputString.trim();
if (inputString.length() > 0) {
stringComplete = true;
}
}
if (stringComplete) {
Serial.printf("inputString: %s\r\n", inputString.c_str());
inputString = "";
stringComplete = false;
}
}
Serial.available()Checks whether you've sent any characters yet, so the board reads only when there's something waiting. Serial.readStringUntil('\n')Gathers what you typed up to the Enter key into one complete message. inputString.trim()Trims the stray newline and spaces off the ends so the echo is clean.Serial.printf("inputString: %s\r\n", inputString.c_str())Sends your message straight back, then the sketch clears it and waits for the next one. Optional side path · no wiring
print(str("\nESP32S3 initialization completed!\n")
+ str("Please input some characters,\n")
+ str("select \"Newline\" below and click send button. \n"))
while True:
print("inputString: ", input())
input()In MicroPython, input() waits for a line you type in Thonny's shell — the same pause-and-read as Serial.available plus readStringUntil.print("inputString: ", input())Echoes your typed line straight back, just like the Arduino sketch.Same cable, no wiring. MicroPython's input() reads from Thonny's shell instead of Serial Monitor, but the two-way 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
Yesterday's cable only carried the board's voice out. The same wires carry your words back in; the sketch just has to check for them and read a full line.
The board asks whether you've sent characters before it tries to read.
It collects your characters up to the Enter key into one message.
Stray newline and spaces come off the ends so the message is clean.
The board sends your message straight back and waits for the next.
check → read a line → answer → wait
Reading when nothing has arrived would just return empty. available() lets the board wait for real input instead.
It gathers characters until the newline you send with Enter, so the board gets one whole message rather than single letters.
05 Know it worked
Success and recovery sit side by side, so you never have to go hunting when something looks off.
The start-up lines print once; after that, each line you send comes straight back prefixed with "inputString:".
06 Make the idea yours
Same working sketch, no wiring — change what the board says back. It fits inside today's 15 minutes.
Change the reply text so the board answers with something like You said: hello instead of the plain inputString: label.
Add an if (inputString == "ping") check that answers pong — the first hint of a board that follows commands.
Logbook
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-DAY12-SERIALRW
How the agent should behave: keep it to upload-type-read, check board, port, cable, baud rate, and the Newline line ending before touching code, and explain available, readStringUntil, and trim on request.