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.
Why This Matters for Your Projects
Section titled “Why This Matters for Your Projects”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.
How GPIO Actually Works
Section titled “How GPIO Actually Works”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.
Output Mode
Section titled “Output Mode”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 outputdigitalWrite(5, HIGH); // set to 3.3V (on)digitalWrite(5, LOW); // set to 0V (off)Input Mode
Section titled “Input Mode”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 inputint state = digitalRead(7); // read the pin: HIGH or LOWAnalog Input
Section titled “Analog Input”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)Pull-Up and Pull-Down Resistors
Section titled “Pull-Up and Pull-Down Resistors”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 LOWpinMode(7, INPUT_PULLDOWN); // default LOW, button pulls HIGHOn the tinyCore
Section titled “On the tinyCore”Reserved Pins
Section titled “Reserved Pins”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:
| Pin | Used For | Notes |
|---|---|---|
| GPIO 3 | I2C SDA | Connected to QWIIC connectors and the IMU |
| GPIO 4 | I2C SCL | Connected to QWIIC connectors and the IMU |
| GPIO 6 | I2C Power | Set HIGH to power QWIIC sensors |
| GPIO 21 | LED_BOOT | Onboard boot status LED |
| GPIO 33 | LED_SIG | Onboard signal LED |
| SD Pins | SD Card | SPI bus for the microSD slot |
Strapping Pins
Section titled “Strapping Pins”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:
| Pin | Function | Default |
|---|---|---|
| GPIO 0 | Boot mode (HIGH = normal, LOW = flash mode) | Internal pull-up (HIGH) |
| GPIO 45 | Flash voltage (LOW = 3.3V, HIGH = 1.8V) | LOW |
| GPIO 46 | Secondary boot mode | Internal pull-down (LOW) |
| GPIO 3 | JTAG source | Floating (rarely relevant) |
After boot completes, all strapping pins work as normal GPIO. Just be careful about what’s connected to them at power-on.
Flash and PSRAM Pins
Section titled “Flash and PSRAM Pins”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.
Voltage: 3.3V Only
Section titled “Voltage: 3.3V Only”Quick Reference
Section titled “Quick Reference”| Feature | ESP32-S3 |
|---|---|
| Total GPIO pins | GPIO 0–21, 26–48 |
| Input-only pins | None (unlike the original ESP32) |
| Internal pull-up/pull-down | All GPIO pins |
| Logic voltage | 3.3V |
| Max voltage tolerance | 3.6V |
| ADC resolution | 12-bit (0–4095) |
| ADC1 pins (WiFi-safe) | GPIO 1–10 |
| ADC2 pins (no WiFi) | GPIO 11–20 |
Learn More
Section titled “Learn More”- Blink an LED — your first GPIO output project
- Read a Button Press — your first GPIO input project
- What is an ADC? — deep dive on analog readings
- What is PWM? — controlling LED brightness and motor speed with GPIO
Video: Introduction to ESP32
Section titled “Video: Introduction to ESP32”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.