Unit A · On the network
What we are making: a board that is reachable. By the end of this session another device in this room can talk to yours, and you will know which of the two modes your school allows.
A network is just an agreement about addresses. Your board needs an address, and something else needs to be able to reach it. There are two ways to arrange that, and they are genuinely different situations — not a real one and a backup.
Mode A — the board creates a network. Nothing else has to exist.
Mode B — the board joins a network somebody else runs.
The board becomes an access point. It hands out addresses. Its own address is always
192.168.4.1. You join that network from your phone exactly like joining any
other WiFi.
Now the board is a client, like your laptop. The router gives it an address, and you have to ask what that address turned out to be.
WiFi.localIP() is the address you type into a browser next session.Ten minutes. Do this now, write the answer on the inside cover of this book, and tell your teacher. The answer decides how your team works for the rest of the year.
| What you see | Why | What to do |
|---|---|---|
| Joins, then drops after a minute | Network kicks unknown devices, or weak signal. | Note it. Session 7 is entirely about surviving this. |
| Never joins, password is right | 5GHz only, or the network needs a login page. | Use Mode A. A network with a sign-in page cannot be joined by a board. |
| Joins but laptop cannot reach it | Client isolation — devices cannot see each other. | Very common on school and guest WiFi. Use Mode A. |
| Address starts 169.254 | It did not really get an address. | Treat as not joined. |
In this session