Skip to content

What is GPIO?

GPIO (General Purpose Input/Output) pins are the physical connections on your tinyCore that let the ESP32-S3 interact with the outside world — turning things on and off, reading sensors, and communicating with other devices.

Every time you wire up an LED, press a button, or plug in a sensor, you’re using GPIO pins. They’re the foundation of everything you’ll build with tinyCore. Understanding how they work (and which ones to use) will save you hours of debugging.

Each GPIO pin on the ESP32-S3 can either send a voltage out or read a voltage in, depending on how you set it up in code.

When you set a pin as an output, the ESP32-S3 drives it to one of two voltage levels: 3.3V (HIGH) or 0V (LOW). That’s it — on or off. This is how you turn on an LED, trigger a relay, or send a signal to another device.

pinMode(5, OUTPUT); // configure GPIO 5 as output
digitalWrite(5, HIGH); // set to 3.3V (on)
digitalWrite(5, LOW); // set to 0V (off)

When you set a pin as an input, the ESP32-S3 measures the voltage on that pin and tells you whether it’s HIGH (close to 3.3V) or LOW (close to 0V). This is how you detect button presses, read digital sensor outputs, or check the state of a signal.

pinMode(7, INPUT); // configure GPIO 7 as input
int state = digitalRead(7); // read the pin: HIGH or LOW

Some GPIO pins can also read analog values — voltages that fall anywhere between 0V and 3.3V. The ESP32-S3’s built-in ADC (Analog-to-Digital Converter) converts that voltage into a number from 0 to 4095. A reading of 0 means 0V, 4095 means 3.3V, and everything in between is proportional. This is how you read things like potentiometers, light sensors, and temperature probes.

int value = analogRead(1); // read analog voltage on GPIO 1 (0–4095)

When a GPIO pin is set as an input but nothing is actively driving it HIGH or LOW, the pin is “floating.” A floating pin picks up random electrical noise and gives you unpredictable readings — your button will appear to randomly press itself. This is a real, common problem.

A pull-up resistor holds the pin at HIGH (3.3V) by default. When you press a button wired to GND, it overrides the resistor and pulls the pin LOW. A pull-down resistor does the opposite — holds the pin at LOW by default, and pressing a button wired to 3.3V drives it HIGH.

The ESP32-S3 has internal pull-up and pull-down resistors on every GPIO pin, so you don’t need to add external resistors for most cases. Just tell Arduino to enable them:

pinMode(7, INPUT_PULLUP); // default HIGH, button pulls LOW
pinMode(7, INPUT_PULLDOWN); // default LOW, button pulls HIGH

The tinyCore board uses certain GPIO pins for onboard hardware. These are already wired up, so you should avoid using them for other things unless you know what you’re doing:

PinUsed ForNotes
GPIO 3I2C SDAConnected to QWIIC connectors and the IMU
GPIO 4I2C SCLConnected to QWIIC connectors and the IMU
GPIO 6I2C PowerSet HIGH to power QWIIC sensors
GPIO 21LED_BOOTOnboard boot status LED
GPIO 33LED_SIGOnboard signal LED
SD PinsSD CardSPI bus for the microSD slot

Four GPIO pins are checked at startup to determine how the chip boots. If you have external circuits holding these pins at unexpected voltages during reset, the board might not start correctly:

PinFunctionDefault
GPIO 0Boot mode (HIGH = normal, LOW = flash mode)Internal pull-up (HIGH)
GPIO 45Flash voltage (LOW = 3.3V, HIGH = 1.8V)LOW
GPIO 46Secondary boot modeInternal pull-down (LOW)
GPIO 3JTAG sourceFloating (rarely relevant)

After boot completes, all strapping pins work as normal GPIO. Just be careful about what’s connected to them at power-on.

GPIO 26–32 are used by the internal flash memory and should not be used. On S3 modules with octal PSRAM (like the ESP32-S3R8), GPIO 33–37 are also occupied.

FeatureESP32-S3
Total GPIO pinsGPIO 0–21, 26–48
Input-only pinsNone (unlike the original ESP32)
Internal pull-up/pull-downAll GPIO pins
Logic voltage3.3V
Max voltage tolerance3.6V
ADC resolution12-bit (0–4095)
ADC1 pins (WiFi-safe)GPIO 1–10
ADC2 pins (no WiFi)GPIO 11–20

DroneBot Workshop — comprehensive ESP32 getting-started tutorial covering GPIO, analog I/O, WiFi, Bluetooth, and more. The first 15 minutes focus on GPIO and pin configuration.