ESP32-S3 Lab · Day 29 of 30

Put the board
on the network

No wiring today — the radio is already inside the ESP32-S3. You hand the board your Wi-Fi name and password, watch it join your network the way a phone does, and read back the address your router assigns it. That address is the board's berth number on the local network — reach it once from your computer and you have opened the door Day 30 walks through.

About 25 minutesArduino firstMicroPython optionalNo wiring today
Agent assist code TSK-DAY29-WIFI

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 you already own: the name and password of your 2.4 GHz Wi-Fi network. Have both written down before you start. 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 of the build — with a Wi-Fi radio already aboard.

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 Station sketch and its Serial Monitor output.
Manual sketch

Official sketch

Sketch_23.1_WiFi_Station.ino

02 One action at a time

Build it

The whole day is edit two lines, upload, and read the monitor. Tap each step as you go to keep your place — you can finish without opening a single field note.

0 / 7 done
  1. Plug the ESP32-S3 into your computer with a data-capable USB cable.

  2. Open Sketch_23.1_WiFi_Station.ino in Arduino IDE.

  3. Replace both "********" strings with your own Wi-Fi name and password — keep the double quotes, and use your 2.4 GHz network.

  4. Select your ESP32-S3 board and its port, then press Upload.

  5. Open Serial Monitor and set the baud rate to 115200.

  6. Watch Setup start, then dots while the board negotiates, then the IP address your router assigns.

  7. Note that address down — Day 30 dials it.

You're aboard the network.

Your ESP32-S3 holds an address on your Wi-Fi. Head to Test & debug to confirm each line of the monitor.

03 Read just enough code

Read the code

The sketch is short enough to read whole. Two lines near the top hold the placeholders you replace with your own credentials; setup() does all the work and loop() stays empty. Switch to MicroPython if you'd rather see the same idea in Python.

Sketch_23.1_WiFi_Station.ino
#include <WiFi.h>

const char *ssid_Router     = "********"; //Enter the router name
const char *password_Router = "********"; //Enter the router password

void setup(){
  Serial.begin(115200);
  delay(2000);
  Serial.println("Setup start");
  WiFi.begin(ssid_Router, password_Router);
  Serial.println(String("Connecting to ")+ssid_Router);
  while (WiFi.status() != WL_CONNECTED){
    delay(500);
    Serial.print(".");
  }
  Serial.println("\nConnected, IP address: ");
  Serial.println(WiFi.localIP());
  Serial.println("Setup End");
}

void loop() {
}
WiFi.begin(ssid_Router, password_Router)Starts the join — the board finds your network by name and offers the password from the two strings above. This is station mode, the board acting as a guest on your network.
while (WiFi.status() != WL_CONNECTED)Waits for the router to accept the board, printing a dot every half second — and it will wait forever, so endless dots mean wrong credentials.
Serial.println(WiFi.localIP())Prints the IP address the router leased once the join succeeds — the board's own number on the network, and the address Day 30 dials.

04 Understand, don't memorise

What it means to join a network and get an address

"Connecting to Wi-Fi" sounds like one thing, but the board runs a three-part handshake to get on, and it ends with something it did not have before: an address of its own on the local network. Today's sketch runs this in station mode — the board joins your network the way a phone does. The same radio can play the opposite role, an access point that hosts a network instead, and knowing the difference is what makes the address make sense.

1

Associate

The board looks for your network by its name, the SSID, and asks the router to let it join.

2

Authenticate

It offers the password you typed into the sketch; the router checks it and either accepts the board or turns it away.

3

Get an address

Once accepted, the router leases the board a free IP address — its own number on the local network, so other devices can find it.

4

Report

The sketch reads that assigned address with localIP and prints it, which is why you always use the number the board shows rather than any example.

The two modes station = join a network and be handed an address · access point = be the network and hand them out

Why the address is the router's to give

The router runs a service called DHCP that keeps a pool of free addresses and leases one to every device that joins. The board does not choose its own number, so the IP it prints will differ from the one in this lesson — always read the address the board shows, never the example.

Station versus access point

In station mode the board is a guest on your network, joining a router that hands out the addresses. In access-point mode it becomes the network itself — broadcasting its own name and leasing addresses to phones that join it, with no router involved. The two roles can even run at once.

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
Setup startConnecting to YourNetworkName......Connected, IP address: 192.168.1.23Setup End

Your network name and the address itself will differ — the IP is whatever your router assigns. A handful of dots is normal; they should stop within a few seconds.

If it doesn't
  • Dots marching forever? The network name or password is wrong. Fix both strings in the sketch, re-upload, and press reset — the loop has no timeout.
  • Your network never connects at all? The board speaks 2.4 GHz Wi-Fi only. Check that your router broadcasts a 2.4 GHz band.
  • Blank monitor? Confirm 115200 baud, then the board and port.
  • Ping gets no reply? Ping the exact address the monitor printed, from a computer on the same 2.4 GHz network, and allow a few seconds — the board answers once it is fully joined.

06 Make the idea yours

Try this: reach the board across your network

The address the monitor printed is a real, routable number — not a label the board keeps to itself. The fastest way to prove the board is truly on your network, and to set up Day 30, is to reach it from another machine that shares the same Wi-Fi.

Read the address

In Serial Monitor, find the line after Connected, IP address: — something like 192.168.1.23. That is the board's own number on your network, leased to it by the router. Copy it exactly.

Ping it from your computer

On a computer joined to the same 2.4 GHz Wi-Fi, open a terminal and run ping 192.168.1.23, swapping in your board's address. Replies coming back mean the board is reachable at that address — the whole point of putting it on the network. On macOS or Linux press Ctrl-C to stop.

Note it for Day 30

Write the address down. Day 30 has your computer dial exactly this number to open a connection to the board, so keeping it handy saves a re-upload. If the board reboots you can reopen the monitor to read it again.

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-DAY29-WIFI

How the agent should behave: teach what joining a network actually means — the board finds the network by name, authenticates with the password, and the router leases it an IP address of its own — and keep credentials private, since the learner edits them into the sketch locally, never into chat. Before touching code, check the 2.4 GHz band, both placeholder strings, and the baud rate. Have the learner read the printed address and reach the board with a ping to prove it is on the network.

Keep your place

Finished Day 29?

Mark it complete — it shows on your course map, and your place is saved on this device.

Field note

Shortcut

Prompt copied