Quick summary
Use this ESP32 pinout tool to pick safer pins for sensors, displays, relays, UART, I2C, SPI, PWM, DAC, and analog inputs before wiring your prototype.
Engineering tool
Search ESP32 DevKit V1 pins, inspect GPIO capabilities, and avoid common boot, ADC, and input-only mistakes before building your IoT or Projek Akhir Tahun prototype.
Click a pin, label, or pad to open its details.
GPIO34 to GPIO39 are input-only on ESP32. ADC2 pins can be unreliable for analog reads while WiFi is active, so ADC1 is usually better for WiFi sensor projects.
Use this ESP32 pinout tool to pick safer pins for sensors, displays, relays, UART, I2C, SPI, PWM, DAC, and analog inputs before wiring your prototype.
Validated notes
A good ESP32 pinout page must do more than show labels. Students need to know which pins are safer for a project demo, which pins can break boot, which analog pins conflict with WiFi, and which pins are input-only. This guide is written for ESP32 DevKit V1 and ESP-WROOM-32 based boards commonly used in Malaysian IoT and Projek Akhir Tahun builds.
These are practical starting points, not absolute rules. Always confirm your exact board, module and library pin mapping.
| Use case | Recommended pins | Practical note |
|---|---|---|
| General digital I/O | GPIO16, GPIO17, GPIO18, GPIO19, GPIO21, GPIO22, GPIO23, GPIO25, GPIO26, GPIO27, GPIO32, GPIO33 | Good starting choices for many sensors, displays, serial modules, buttons and low-current signals. |
| I2C | GPIO21 SDA, GPIO22 SCL | Common default pins used by many Arduino ESP32 examples for OLED displays, BME280 and other I2C modules. |
| VSPI | GPIO23 MOSI, GPIO19 MISO, GPIO18 SCK, GPIO5 CS | Common SPI mapping. GPIO5 is a strapping pin, so avoid circuits that pull it to the wrong level during boot. |
| UART2 | GPIO16 RX2, GPIO17 TX2 | Useful for GPS, GSM, LoRa UART modules and serial debugging without disturbing USB programming pins. |
| Analog with WiFi | GPIO32, GPIO33, GPIO34, GPIO35, GPIO36, GPIO39 | ADC1 pins are safer for WiFi projects. Remember GPIO34-GPIO39 are input-only. |
| DAC | GPIO25 DAC1, GPIO26 DAC2 | Useful for simple analog voltage output. These pins also have ADC2, so avoid ADC2 readings while WiFi is active. |
GPIO0, GPIO2, GPIO5, GPIO12, GPIO15
External pull-ups, pull-downs or modules on these pins can stop boot or flashing if the startup level is wrong.
GPIO34, GPIO35, GPIO36, GPIO39
Use for buttons or analog sensors only. They cannot drive outputs and do not have software pull-up or pull-down support.
GPIO6, GPIO7, GPIO8, GPIO9, GPIO10, GPIO11
Usually connected to SPI flash on ESP32-WROOM modules. Do not use them for normal project wiring.
GPIO1 TX0, GPIO3 RX0
Used for programming and serial logs. Heavy loads here can disturb uploads or debugging.
GPIO0, GPIO2, GPIO4, GPIO12-GPIO15, GPIO25-GPIO27
ADC2 readings can conflict with WiFi. Use ADC1 for analog sensors in WiFi projects.
These examples cover the modules students commonly use in FYP demos. They keep WiFi, serial upload and boot behavior in mind.
DHT11 or DHT22 temperature monitor
GPIO4, GPIO16, GPIO17 or GPIO23
Use a stable 3.3V supply and a data pull-up if the sensor module does not include one.
OLED SSD1306 display
GPIO21 SDA and GPIO22 SCL
This is the easiest I2C wiring for most ESP32 Arduino examples.
GPS NEO-6M
GPIO16 RX2 and GPIO17 TX2
UART2 keeps GPS serial away from USB programming pins.
Relay module
GPIO18, GPIO19, GPIO23, GPIO25, GPIO26 or GPIO27
Use a proper relay module and separate power path for loads. Do not drive relay coils directly from GPIO.
MQ gas sensor analog output
GPIO32 or GPIO33
Prefer ADC1 if the project also uses WiFi, Blynk, Firebase, MQTT or HTTP.
The caution notes are aligned with official Espressif GPIO and ADC documentation. Espressif documents the ESP32 strapping pins, input-only pins, flash-connected pins, and ADC2 WiFi limitation. Always check the exact module and board clone before final PCB or hardware submission.
GPIO21, GPIO22, GPIO23, GPIO19, GPIO18, GPIO16, GPIO17, GPIO32 and GPIO33 are common choices for many ESP32 DevKit V1 projects, depending on the peripheral used.
GPIO0, GPIO2, GPIO5, GPIO12 and GPIO15 are strapping pins. External circuits on these pins can affect boot mode if they force the wrong level at startup.
ADC2 pins can conflict with the WiFi driver on ESP32. For analog readings in WiFi projects, ADC1 pins are usually the safer choice.
No. GPIO34, GPIO35, GPIO36 and GPIO39 are input-only pins on ESP32 and should not be used to drive outputs.
GPIO21 for SDA and GPIO22 for SCL are the common default I2C pins on many ESP32 DevKit V1 examples. ESP32 can route I2C to other GPIOs, but using the common defaults makes student projects easier to debug.
Avoid GPIO6 to GPIO11 on typical ESP32-WROOM development boards because they are usually connected to the module flash memory and are not exposed as safe general-purpose project pins.