TinySkiff ESP32-S3 Lab · Day 30 of 30

Put your board
on the network

Day thirty — the last leg. The ESP32-S3 joins your Wi-Fi, opens port 80, and waits for your computer to dial in. When a line you type on one machine appears on the other, your board has become what this course promised on day one: a device on the network, with an address, a door, and something to say.

About 30 minutesArduino firstMicroPython optionalFinal day — no wiring
Agent assist code TSK-DAY30-TCPIP

Hand this to an agent so it can pull the lesson packet and coach you step by step.

01 First, know the pieces

What you need

Three things on the bench, plus one download for your computer — Processing, which arrives in the steps. Tap Define on anything unfamiliar; the answer opens as a field note you can read and dismiss without losing your place.

Official manual photo of the ESP32-S3 development board.
Manual photo

ESP32-S3 board

The brain — today it joins your network and listens.

Official manual screenshot of the Arduino IDE interface.
Manual screenshot

Arduino IDE

Uploads the sketch and opens Serial Monitor.

Official manual page showing the WiFi Server sketch and its Serial Monitor output.
Manual sketch

Official sketch

Sketch_24.2_WiFiServer.ino

02 One action at a time

Build it

All the wiring days led here — today the path is code, one download, and a conversation across your own network. Tap each step as you go to keep your place.

0 / 8 done
  1. Open Sketch_24.2_WiFiServer.ino in Arduino IDE.

  2. Replace the two ******** placeholders with your own Wi-Fi name and password — the same network your computer is on.

  3. On your computer, install Processing from processing.org/download.

  4. In Processing, add the ControlP5 library — Sketch → Import Library → Add Library, then search ControlP5.

  5. Back in the sketch folder, open the bundled sketchWiFi/sketchWiFi.pde in Processing and click Run.

  6. Upload the Arduino sketch, then open Serial Monitor at 115200 and watch the board join your network and print its IP address and port 80.

  7. In sketchWiFi, choose TCP CLIENT mode, enter the board's printed IP and port 80, and connect.

  8. Type a line in sketchWiFi and press Enter — it lands in Serial Monitor. Answer from Serial Monitor's send box — it lands in sketchWiFi.

Two machines, one line.

Text is crossing your own network between computer and board. Head to Test & debug to confirm the exchange — the last check of the voyage.

03 Read just enough code

Read the code

The sketch does two jobs. setup() joins your Wi-Fi as a station, prints the address the router assigned, and starts the server; loop() is a relay, carrying each line from the network to the monitor and each line from the monitor to the network. Switch to MicroPython to see the same idea in raw sockets.

Sketch_24.2_WiFiServer.ino
#define port 80
WiFiServer  server(port);

WiFi.begin(ssid_Router, password_Router);
server.begin(port);

WiFiClient client = server.accept();               // listen for incoming clients
Serial.println(client.readStringUntil('\n')); // print it out the serial monitor
client.print(Serial.readStringUntil('\n')); // print it out the client.
WiFi.begin(ssid_Router, password_Router)Joins your router's network as a station — the router hands the board an IP address.
server.begin(port)Starts listening at port 80 — a numbered door other machines can knock on.
client.print(Serial.readStringUntil('\n'))Reads the line you typed in Serial Monitor and sends it down the network to the computer.

04 Understand, don't memorise

An address, a port, a service

Strip away the scale, and every connection on the internet is this same four-beat exchange. Today it happens entirely inside your own router.

Join

Station mode

The board joins your Wi-Fi and the router hands it an address.

Listen

A door opens

server.begin() waits at port 80 — one numbered door at that address.

Dial

The client calls

Your computer knocks with the exact IP and port the monitor printed.

Talk

One shared line

Both ends read and write the same stream until one hangs up.

The model server listens at an address and port → client dials it → one shared line

Day 29 gave it the address

Yesterday the board joined the network and the router handed it a number. Today it opens a door at that number and offers a service — an address, a port, and something listening.

What "on the internet" means

Every web server in the world is this same shape at larger scale — an address, a port, a service that answers when dialled. Your board now has all three.

05 Know it worked

Test & debug

Success and recovery sit side by side, so you never have to go hunting when something looks off.

What you should see
Serial Monitor115200 baud
Connecting to YourNetworkName.....WiFi connected.IP address: 192.168.1.42IP port: 80Client connected.hello from the chart tableClient Disconnected.

Your address will differ — always dial the one your monitor just printed. The middle lines are whatever the two machines say to each other.

If it doesn't
  • Dots forever? Re-check the Wi-Fi name and password in the sketch, confirm the network has a 2.4 GHz band, then press the board's reset button.
  • Processing can't connect? Both machines must be on the same network — and use the IP the monitor just printed, since it changes between networks.
  • ControlP5 error on Run? Install the library from Processing's Add Library window, then run the sketch again.
  • Nothing arrives? Connect before typing, and end every line with Enter.

06 Make the idea yours

Try this: swap the roles

Same network, one last idea: the roles are a choice. It fits inside today's 30 minutes — and it closes the course.

Let the board dial out

Open Sketch_24.1_WiFiClient.ino, put your computer's address in REMOTE_IP, and run sketchWiFi in TCP SERVER mode on port 8888. The board dials in and introduces itself — "Hello", then "This is my IP."

Teach it a word

Back in the server sketch, check each incoming line and have the board client.print("aye\n") whenever the line contains "ahoy". A two-word protocol, and it's yours.

Logbook

07 Learn it with a hand on the tiller

Coach me through it

Every lesson ships with a code and a machine-readable packet, so an agent can guide you with full context.

Lesson code

TSK-DAY30-TCPIP

How the agent should behave: guide one step at a time, wait for you to confirm, explain terms on request, and check credentials, the 2.4 GHz band, and the printed IP before changing code.

Field note

Shortcut

Prompt copied