A first build on the expansion base
An LED and a push button on three jumper wires, all at the top of the left strip: GPIO 4 blinks the LED, GPIO 5 reads the button with its internal pull-up, and ground is the hole between them and the supply.
Two pins and a ground
Seat the board first, with its USB sockets over the boxes printed USB, as the first page of this chapter says. Then wire the build before the cable goes in.
Everything sits at the top of the left strip. Counting holes down from the display connector, hole 1 is 3V3, hole 2 is GND, hole 3 is GPIO 4 and hole 4 is GPIO 5. The ground is next to the signals, so the jumpers are short.
The strips are 2.54 mm, so a breadboard takes jumper wires from them and nothing else is needed. Each hole is on two strips at once, so use whichever your wire end fits. The 3D model draws the outer strip as pins and the inner as a socket; look at your own board.
Why these two pins
Not every pin on a strip is a good first choice. GPIO 19 and 20 are the native USB port, GPIO 48 is the RGB LED, and GPIO 3 is read at boot, so a wire there can change how the board starts. 0, 35 to 37 and 43 to 46 are the ones that stop on the socket and never reach a strip. GPIO 4 and 5 are free on all counts.
The sketch
The LED half is the whole of step one: pinMode(LED_PIN, OUTPUT) and a
digitalWrite HIGH and LOW with a delay between. The resistor is not optional.
A GPIO is not meant to drive an LED straight, and without one the LED draws more
than the pin should give.
Step two adds pinMode(BUTTON_PIN, INPUT_PULLUP). That switches on a resistor
inside the chip between the pin and 3V3, so the pin reads HIGH on its own. The
button joins it to ground, and the read goes LOW while it is held. The base has
no pull-ups of its own, so without that line the pin floats and reads noise.
Before you upload, set Tools -> Board to ESP32S3 Dev Module, USB CDC On Boot to Enabled, Flash Size to 16MB and PSRAM to OPI PSRAM. The same list is at the top of the sketch, so it travels with the file.
The code
Blinks an LED on GPIO 4 once a second. Hold a button on GPIO 5 and it blinks five times as fast, and the Serial Monitor says so.
// ESP32-S3 Expansion Base: blink an LED, speed it up with a button.
//
// Seat the ESP32-S3 with its two USB sockets over the boxes printed
// USB on the base, then plug a cable into either socket.
//
// Wiring, left strip, holes counted from the display connector:
// hole 3 (GPIO 4) -> 330 ohm resistor -> LED long leg
// LED short leg -> GND rail
// hole 4 (GPIO 5) -> one side of the push button
// other side -> GND rail
// hole 2 (GND) -> GND rail
//
// Arduino IDE, Tools menu:
// Board ESP32S3 Dev Module
// USB CDC On Boot Enabled (Disabled: UART socket)
// Flash Size 16MB (128Mb)
// PSRAM OPI PSRAM
// Serial Monitor 115200
// No library needed.
const int LED_PIN = 4;
const int BUTTON_PIN = 5;
void setup() {
Serial.begin(115200);
pinMode(LED_PIN, OUTPUT);
pinMode(BUTTON_PIN, INPUT_PULLUP); // reads LOW while pressed
}
void loop() {
bool pressed = digitalRead(BUTTON_PIN) == LOW;
int wait = pressed ? 100 : 500; // milliseconds on, and off
digitalWrite(LED_PIN, HIGH);
delay(wait);
digitalWrite(LED_PIN, LOW);
delay(wait);
if (pressed) Serial.println("button held: blinking fast");
}Both pins are on the left strip and neither is used by anything on the ESP32-S3 board or read at boot. The button needs no resistor: INPUT_PULLUP turns on a pull-up inside the chip, so the pin reads HIGH until the button joins it to ground.
When it does not work
Turn the LED round: the long leg goes to the resistor and the short leg to ground. Then check the jumper is in hole 3 of the left strip, counted from the display connector, and that the ground jumper is in hole 2. A pin that is not in the sketch's list does nothing.
The button reads LOW when pressed, so one side goes to GPIO 5 and the other to ground. A button wired to 3V3 instead never pulls the pin low. A wire loose in hole 4 leaves the pin floating, which can look like random presses.
That is the ESP32-S3 and the cable, not the base. Check the Port in the Tools menu, try the other USB socket, and if it still fails hold BOOT, press and release RST, then release BOOT and upload again.
Check which strip you are using. The 3D model draws the outer strip as pins and the inner as a yellow socket, so a jumper with a socket end goes on the outer strip and one with a pin end goes in the inner. Both strips are the same copper.
The pluggable terminal base: the same board, the same warning, a different way in for the wires.
Seat the board first →Edit this page — content/books/esp32s3-base/expansion-first-build.mdx
Questions people ask first
Which way round does the ESP32-S3 go on the base?
Its USB sockets go over the two boxes printed USB, at the bottom of the base, with the antenna end at the top under the display connector.
Nothing stops the other way: the two sockets are identical, so the board seats just as firmly end for end. Put in backwards, its 3.3 V regulator output ends up wired to ground, and the board can be damaged for good. Seat the board first and plug the USB cable in second, every time.
Where does the power for my sensors come from?
The base has no regulator, no battery connector and no power input. It is powered through the ESP32-S3's own USB sockets, and every power way on it is one of that board's pins carried out.
The 3V3 ways are the output of the regulator on the ESP32-S3. The 5V ways are the board's 5V pin: about 4.6 V with a USB cable plugged in, and nothing without one. Nothing on the way is switched, fused or filtered.
Can I run a motor, relay or LED strip from the base?
Not from its power ways. Motors, relays, servos and long LED strips need their own supply, with its ground joined to a GND way on the base, because the ESP32-S3's regulator is small and is also running your sketch.
Small sensors and a display can take 3V3 and ground from the base. No current rating is quoted for the ways, because none has been checked.
How many GPIOs does the Pluggable Terminal Base bring out?
24 of the ESP32-S3 Gold's 36 GPIOs, once each, on two 12-way push-in blocks, plus two 4-way power blocks.
Twelve do not come out: 0, 1, 2, 3, 4, 35, 36, 37, 43, 44, 45 and 46, and the RST pin. GPIO 1, 2 and 4 reach the display connector and nothing else. All of the I²C and SPI pins are on the left block, and GPIO 19 and 20 (the native USB pair, on the right block) should be left alone while a sketch is using USB.
How many GPIOs does the Screw Terminal Base bring out?
26 of the ESP32-S3's GPIOs, once each, on two 15-way screw terminal blocks, with 3V3 on the left block and 5V on the right. Ten GPIOs do not come out.
The native USB pins (GPIO 19 and 20) are on the right block: a wire on either one shares the USB lines with the computer, so leave them alone unless the sketch is not using native USB.
Questions about this product
See what other owners have asked, and read their solutions.
This page covers several products. Choose yours to see the right discussions.
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.