Skip to content
esp-labsESP32-S3 bench guide
ESP32-S3 DevKitC pinoutThis lesson uses: VCC on 3V3, BLK on 7, RES on 8, DC on 9, CS on 10, SDA on 11, SCL on 12, GND on GND, BTN on 5, BOOT on 0.ESP32-S3WROOM-1 N16R8BOOTRSTRGBUSBCOM3V3VCC3V3RST45BTN67BLK151617188RES3469DC10CS11SDA12SCL13145VGNDGNDGNDTX 43RX 441242414039383736350BOOT454847212019GNDGND
  • used in this lesson
  • safe GPIO
  • avoid
  • power
  • ground
  • button input
  • RC522
Between lessons
  1. Ctrl+C closes the monitor on the Mac only. The board keeps running.
  2. Unplug USB: this is what stops the program and the screen
  3. Rewire while off
  4. Check VCC is on 3V3, no loose ends
  5. Plug in, flash the next lesson

Never unplug during Writing at 0x…. Pin changing from output to input? Flash first, then wire.

Lesson W3

Wi-Fi · lesson 3 of 3

Weather from the internet, a poet from the cloud

built, not flashed

The board becomes an internet client. It fetches the weather for your city over HTTPS as JSON (Open-Meteo, no account or key) and draws it: an animated sky, the next 24 hours, the week. Then the Bench Oracle: the board sends an AI model what it knows about this moment (place, time, weather, its own temperature) and gets back a haiku, or an answer to your question, plus an LED colour and a scene, as structured JSON. The request goes through LiteLLM on your Mac, so any provider and model works and the provider keys never touch the chip.

You will learn

  • HTTPS client
  • TLS certificates
  • JSON + filters
  • REST APIs
  • AI function calling
  • LLM gateway (LiteLLM)
  • worker tasks
uv run pio run -d labs/wifi-lab-w3 -e wifi-lab-w3 -t upload
Open this lab's code on GitHubesp-labs / labs / wifi-lab-w3 (opens in a new tab)

Parts required

Parts library
  • ESP32-S3-DevKitC-1 + USB-C data cable
  • 1.9″ ST7789 screen
  • 2.4 GHz Wi-Fi network
  • Optional: Push button

Follow one request, step by step

Step-by-step TLS handshake and HTTPS REST request sequence between the ESP32-S3 and a remote JSON API.

  • Key concepts: HTTPS client, TLS certificates, JSON + filters, REST APIs, AI function calling, LLM gateway (LiteLLM), worker tasks.
  • Signals & pins: 3V3 (VCC), GPIO7 (BLK), GPIO8 (RES), GPIO9 (DC), GPIO10 (CS).

Interactive diagram loads after page initialization.

Steps

0 of 8 ticked. Ticks are saved in this browser.

Provider keys stay in the gateway's .env on your Mac. The board only stores the gateway's own key (NVS, never printed: the log shows its last 4 characters), and ai key forget erases it. On your Wi-Fi the board talks plain http to the gateway; for anywhere, put the gateway behind https (a tunnel or a server, as in W2 variation 2). Set a spend limit at each provider; the board asks at most once per 10 s and never by itself.

Preview: what you should see

Simulated ST7789 weather and cloud-poet screen rendering live JSON API payloads fetched over HTTPS.

  • Key concepts: HTTPS client, TLS certificates, JSON + filters, REST APIs, AI function calling, LLM gateway (LiteLLM), worker tasks.
  • Signals & pins: 3V3 (VCC), GPIO7 (BLK), GPIO8 (RES), GPIO9 (DC), GPIO10 (CS).

Interactive diagram loads after page initialization.

ESP32-S3 peripherals used in this lab

Open interactive GPIO pinout

Explore the hardware blocks, pin rules, and registers behind this experiment.

  • GPIO and IO MUX

    45 pins, and a matrix that routes almost any signal to almost any pin

  • SPI

    Fast four-wire bus for screens, card readers and flash

  • Wi-Fi

    2.4 GHz 802.11b/g/n, as a station, an access point or both

  • Crypto accelerators

    Hardware SHA, AES, RSA, HMAC and digital signatures

  • Random number generator

    True random numbers from thermal noise

  • UART

    Three serial ports, the one you see in the serial monitor

Troubleshooting & hardware gotchas

See all 17 ESP32-S3 hardware gotchas
What if it does not work or behaves unexpectedly?
Provider keys stay in the gateway's .env on your Mac. The board only stores the gateway's own key (NVS, never printed: the log shows its last 4 characters), and ai key forget erases it. On your Wi-Fi the board talks plain http to the gateway; for anywhere, put the gateway behind https (a tunnel or a server, as in W2 variation 2). Set a spend limit at each provider; the board asks at most once per 10 s and never by itself.
Four pins are read at reset
GPIO0, GPIO3, GPIO45 and GPIO46 are sampled the moment the chip comes out of reset: they pick the boot mode, the flash voltage, the ROM log and the JTAG source. Anything wired to them must not pull them the wrong way at power-up. After reset they are normal pins again.
GPIO3 has no pull resistor at reset
GPIO0 has a weak pull-up and GPIO45/46 weak pull-downs, but GPIO3 floats. When the eFuses make it choose the JTAG source, an outside circuit has to hold it at a clear level.
ADC2 stops working while Wi-Fi is on
The ADC2 channels (GPIO11-20) cannot be used at the same time as Wi-Fi: the radio shares ADC2 through an arbiter. Put analog sensors on ADC1 (GPIO1-10), as the sound labs do with GPIO6.
GPIO47 and 48 run at 1.8 V on R16V modules
Modules with the ESP32-S3R16V chip set the flash voltage to 1.8 V, and GPIO47/48 share that supply. A 3.3 V part on those pins sees the wrong levels.