Intro · lesson 3 of 3
An LED on the breadboard
Build your first circuit and control it by typing commands. The LED keeps animating while the board listens.
On the board
- GPIO 4LED +
- GNDLED −
You will learn
- breadboard rows
- resistors
- PWM brightness
- state machines
uv run pio run -d labs/02-led -e 02-led -t upload -t monitorParts required
Parts library- ESP32-S3-DevKitC-1 + USB-C data cable
- LED + 220–330 Ω resistor
Wiring
| From | To | Notes |
|---|---|---|
| GPIO 4 | resistor 220–330 Ω | first leg |
| resistor | LED long leg (+) | other leg, same row |
| LED short leg (−) | GND | blue rail or GND pin |
Steps
0 of 4 ticked. Ticks are saved in this browser.
No resistor yet? The code sets the weakest pin drive (about 5 mA) as a safety net. Still add one soon.
Preview: what you should see
Interactive breadboard LED simulator demonstrating LEDC PWM brightness fades, blink intervals, and serial CLI commands.
- Key concepts: breadboard rows, resistors, PWM brightness, state machines.
- Signals & pins: GPIO4 (LED +), GND (LED −).
Interactive diagram loads after page initialization.
ESP32-S3 peripherals used in this lab
Open interactive GPIO pinoutExplore 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
- LED PWM
Eight PWM channels that dim and fade LEDs on their own
- UART
Three serial ports, the one you see in the serial monitor
- CPU
Two Xtensa LX7 cores at up to 240 MHz
- SRAM
512 KB of fast on-chip RAM for your code and data
- ROM
384 KB of factory code: the bootloader and download mode
Troubleshooting & hardware gotchas
See all 17 ESP32-S3 hardware gotchas- What if it does not work or behaves unexpectedly?
- No resistor yet? The code sets the weakest pin drive (about 5 mA) as a safety net. Still add one soon.
- 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.
- 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.
- The pins are not 5 V tolerant
- A high input may go up to the pin's supply plus 0.3 V, so about 3.6 V on a 3.3 V board, and the power pins are rated to 3.6 V at most. 5 V from a sensor or an Arduino can damage the chip: use a level shifter or a divider.