LOLIN D32
by Wemos
Wemos ESP32 board with LiPo charger and USB - ideal for battery-powered projects and embedded apps.

On this page
LOLIN D32 Pinout
33 pins · 2.54 mm pitch| Pin | GPIO | Labels | Status | Capabilities | Notes |
|---|---|---|---|---|---|
| 1 | - | 3V33V3.3V | power | - | 3.3 V rail from the ME6211 regulator (JP1 pin 1) |
| 2 | - | RSTRESET | control | - | ESP32 chip enable (EN) - printed RS on the front, RESET on the back; 10k pull-up, 100 nF to GND and the RESET button to GND. Pull LOW to reset |
| 3 | 36 | IO36GPIO36VPSENSOR_VPA0 | strapping | adc | ADC1_CH0; input only, no internal pull-up/down |
| 4 | 39 | IO39GPIO39VNSENSOR_VNA3 | strapping | adc | ADC1_CH3; input only, no internal pull-up/down |
| 5 | 34 | IO34GPIO34A6 | strapping | adc | ADC1_CH6; input only, no internal pull-up/down |
| 6 | 32 | IO32GPIO32A4T9 | safe | adc · touch · pwm | ADC1_CH4; Touch 9 |
| 7 | 33 | IO33GPIO33A5T8 | safe | adc · touch · pwm | ADC1_CH5; Touch 8 |
| 8 | 25 | IO25GPIO25DAC1A18 | safe | adc · dac · pwm | ADC2_CH8 (unusable while Wi-Fi is on); DAC1 |
| 9 | 26 | IO26GPIO26DAC2A19 | safe | adc · dac · pwm | ADC2_CH9 (unusable while Wi-Fi is on); DAC2 |
| 10 | 27 | IO27GPIO27A17T7 | safe | adc · touch · pwm | ADC2_CH7 (unusable while Wi-Fi is on); Touch 7 |
| 11 | 14 | IO14GPIO14HSPI_CLKA16T6 | strapping | adc · touch · spi · pwm | JTAG MTMS; ADC2_CH6 (unusable while Wi-Fi is on); Touch 6 |
| 12 | 12 | IO12GPIO12HSPI_MISOA15T5 | strapping | adc · touch · spi · pwm | strapping pin (MTDI): HIGH at boot selects 1.8 V flash and stops a 3.3 V module booting - keep it LOW at reset; ADC2_CH5 (unusable while Wi-Fi is on); Touch 5 |
| 13 | 13 | IO13GPIO13HSPI_MOSIA14T4 | strapping | adc · touch · spi · pwm | JTAG MTCK; ADC2_CH4 (unusable while Wi-Fi is on); Touch 4 |
| 14 | - | LDO_ENEN | control | - | Enable of the ME6211 3.3 V regulator, NOT the ESP32 EN: held high to VIN through R4 100k. Pull LOW to switch the 3.3 V rail off (and the whole board with it) |
| 15 | - | USBVBUS5V | power | - | USB VBUS (5 V) straight from the micro-USB connector, before the B5819 diode; feeds the TP4054 charger |
| 16 | - | BATVBAT | power | - | LiPo battery + - the same net as the PH-2 socket, charged by the TP4054 (500 mA max) and switched onto VIN by the CJ2301 when USB is absent |
| 17 | - | GND | ground | - | Ground |
| 18 | 23 | IO23GPIO23MOSI | safe | spi · pwm | VSPI MOSI |
| 19 | 22 | IO22GPIO22SCL | safe | i2c · pwm | I2C SCL (Arduino default) |
| 20 | 1 | IO1GPIO1TXTXD0 | uart | uart · pwm | UART0 TX to the USB-serial chip (boot log, uploads) |
| 21 | 3 | IO3GPIO3RXRXD0 | uart | uart · pwm | UART0 RX from the USB-serial chip (uploads) |
| 22 | 21 | IO21GPIO21SDA | safe | i2c · pwm | I2C SDA (Arduino default) |
| 23 | 19 | IO19GPIO19MISO | safe | spi · pwm | VSPI MISO |
| 24 | 18 | IO18GPIO18SCK | safe | spi · pwm | VSPI SCK |
| 25 | 5 | IO5GPIO5SSLED_BUILTIN | strapping | spi · pwm | On-board user LED (LED2, active LOW: 3V3 - R9 2k - LED - IO5); VSPI SS; strapping pin: sets SDIO-slave timing with MTDO at reset, does not affect normal boot |
| 26 | 17 | IO17GPIO17TX2 | uart | uart · pwm | UART2 TX (Arduino core 2.x default) |
| 27 | 16 | IO16GPIO16RX2 | uart | uart · pwm | UART2 RX (Arduino core 2.x default) |
| 28 | 4 | IO4GPIO4A10T0 | safe | adc · touch · pwm | ADC2_CH0 (unusable while Wi-Fi is on); Touch 0 |
| 29 | 0 | IO0GPIO0A11T1 | strapping | adc · touch · pwm | strapping pin: LOW at reset enters the ROM bootloader; the auto-flash transistors drive it from DTR/RTS; ADC2_CH1 (unusable while Wi-Fi is on); Touch 1 |
| 30 | 2 | IO2GPIO2A12T2 | strapping | adc · touch · pwm | strapping pin: must be LOW or floating to enter the bootloader; ADC2_CH2 (unusable while Wi-Fi is on); Touch 2 |
| 31 | 15 | IO15GPIO15HSPI_CSA13T3 | strapping | adc · touch · spi · pwm | strapping pin (MTDO): LOW at boot silences the ROM boot log; ADC2_CH3 (unusable while Wi-Fi is on); Touch 3 |
| 32 | - | GND | ground | - | Ground |
| 33 | 35 | IO35GPIO35VBAT_SENSEA7 | strapping | adc | Battery voltage sense, not on a header: VBAT through a 100k / 100k divider (R12 / R17), so VBAT = 2 x the pin voltage; ADC1_CH7; input only, no internal pull-up/down |
Start with these
13 pins with no boot or system involvementFreely assignable - no strapping, flash, USB or JTAG duties. Ideal first picks for buttons, sensors and LEDs.
Fine - with a little care
12 pins · 12 things to knowIO36 Input-only GPIO (no output); ADC1 channel 0, Hall sensor VP. Other
Cannot be used as output; only suitable for input (e.g., analog read).
IO39 Input-only GPIO (no output); ADC1 channel 3, Hall sensor VN. Other
Cannot be used as output; only suitable for input.
IO34 Input-only GPIO (no output driver); ADC1 channel 6. Other
Cannot be used as output (no drive capability); only suitable for analog/digital input.
IO14 JTAG mode select pin (TMS); also HSPI CLK and PWM-capable GPIO. JTAG
Used for JTAG debugging (TMS); driving it as GPIO may interfere with JTAG or produce spurious signals at boot.
IO12 Bootstrapping pin; JTAG TDI; sets flash voltage (VDD_SDIO); also HSPIQ (flash data line). Strapping
Keep LOW during boot (internal PD); pulling HIGH at reset selects 1.8V flash mode, causing flash brownout if 3.3V flash is used.
IO13 JTAG clock pin (TCK); also ADC2 channel 4 / Touch4 input. JTAG
Used for JTAG debugging (TCK); avoid using as GPIO if JTAG is needed.
IO1 Default UART0 TX pin for USB-serial programming and console. UART
Connected to on-board USB-UART for uploading and logs; drives serial output at boot, so using as GPIO can disrupt programming or console.
IO3 Default UART0 RX pin for USB-serial programming (console input). UART
Used for receiving data from USB-UART (programming); also pulled HIGH at boot for console communication, so using as GPIO can disrupt uploads.
IO5 Bootstrapping pin; internal pull-up; VSPI CS0 (default SPI chip-select); acts as FSPIWP (flash write-protect) on internal-flash variants. Strapping
Must be HIGH during boot; if pulled LOW at reset, alters SDIO slave timing and may prevent normal boot.
IO0 Bootstrapping pin (enter bootloader when low); internal pull-up. Strapping
Must be HIGH during boot for normal startup; if held LOW on reset, forces flash programming mode.
IO2 Bootstrapping pin (must be low or floating at reset); internal pull-down. Strapping
If driven HIGH on reset (while IO0 is LOW), selects an unsupported SDIO boot mode, causing boot failure.
IO15 Bootstrapping pin; JTAG TDO; controls UART0 boot log output; also HSPICS0 (secondary SPI CS). Strapping
Keep HIGH during boot (internal PU); if LOW on reset, bootloader log is silenced and boot mode may change.
Only if you know the tricks
1 pins · 1 thing to knowIO35 Battery voltage sense, not on a header: VBAT through a 100k / 100k divider (R12 / R17), so VBAT = 2 x the pin voltage; ADC1_CH7; input only, no internal pull-up/down onboard hardware
Wired to the battery voltage divider on this board, which is soldered down. Driving it from your own code breaks that function.
The LOLIN D32 pinout brings out 33 pins at a 2.54 mm pitch - 26 usable GPIO alongside the 3V3, USB, BAT and GND power rails.
Peripheral wiring is straightforward: I²C is mapped to SDA on GPIO21 and SCL on GPIO22; the SPI bus (MOSI, MISO, SCK, SS) is broken out in full; TX/RX on GPIO1 and GPIO3 cover serial logging and flashing.
Beyond plain digital I/O you get 16 ADC-capable pins for sensors and battery monitoring, PWM on 22 pins, 10 capacitive-touch inputs and 2 true DAC outputs.
12 of the exposed pins carry boot-time or system duties on the ESP32 (IO36, IO39, IO34 and 9 more) - check the guidance above before wiring anything to them. IO32, IO33, IO25, IO26 and 9 more are free of any such role - the safest first picks.
Getting started
flash your first firmware in ~2 minutesBoard: ESP32 Dev Module Flash Size: 4MB (32Mb) Flash Mode: DIO Partition Scheme: Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) Upload Speed: 921600
// toggle GPIO32 - wire an LED and resistor to it
void setup() {
pinMode(32, OUTPUT);
}
void loop() {
digitalWrite(32, HIGH); delay(500);
digitalWrite(32, LOW); delay(500);
}[env:d32]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
upload_speed = 921600esp32dev - or type it after board =.esp32:
board: esp32dev
variant: esp32
framework:
type: esp-idf
# blink - GPIO32
output:
- platform: gpio
pin: 32
id: led_out
light:
- platform: binary
name: "LED"
output: led_outesp32dev (same ids as PlatformIO).esptool.py --chip esp32 --port /dev/ttyACM0 \
--baud 921600 write_flash 0x1000 firmware.bin--port = your /dev/tty* (macOS/Linux) or COMx (Windows).Downloads
Free for non-commercial use, credit espboards.dev · LicenseBoard illustration
The bare LOLIN D32 board drawn to scale at 57 × 25.4 mm, with no pin labels on it. Made for slide decks, wiring diagrams and project write-ups where a photo is too busy. Take the scalable SVG for print or editing, the high-resolution PNG to drop straight in, or the transparent PNG when you need it with no background behind it.
Pinout diagram
Every pin on both sides of the board with its functions, drawn by ESPboards from the ESP32 Series Datasheet v5.3 - the same sheet shown at the top of this page. The PNG is a high-resolution image for screens, the SVG is vector so it stays sharp at any size, and the PDF is laid out to print on A4 or Letter.
Yours to use, share and adapt for non-commercial work, as long as you credit espboards.dev - the full terms and ready-made credit lines are here.
Specifications
ESP32 · 57 × 25.4 mm · vs other ESP32 chips →Dimensions

About this board
Inside sits the ESP32 - a dual-core Xtensa with both Bluetooth Classic and BLE.
At $6.50 it's cheaper than most ESP32 boards, which usually run around $20.
Around the module: battery charging (TP4054) via JST-PH 2.0, status LEDs (User (GPIO5), Charge) and Reset buttons.
Where to buy
prices are typical street prices
Resources
Similar boards




