LOLIN32 Lite pinout: every pin by GPIO number, and the blue LED
Beginner
Or see every lesson.
- 526parts on the bench
- 46boards running now
- 1.00xreal time, on every board
The Wemos LOLIN32 Lite is a classic ESP32 on a narrow board with a LiPo socket. It is the same chip as the ESP32 DevKit V1, on a board small enough to straddle a breadboard with one row free on each side. This page lists its pins and helps you find the ones you need, from power and ground to inputs, outputs, and the blue LED.
The silkscreen numbers are the GPIO numbers, so 22 on the board is pin 22 in your code. The first two pins on the left are marked VP and VN, which are GPIO 36 and GPIO 39. Pins 34, 35, VP and VN are inputs only. There is no 5 V pin, and there are no TX or RX pins.
Every pin on the board
The table has one row for each of the 29 holes of the LOLIN32 Lite in Mokxi, in the order of the part's pin list, which follows the board's headers. A row that says "Not a GPIO" is a supply, a ground or a control pin, and a sketch cannot drive it.
Every row below is worked out from the same board model the simulator runs: the pin list, the Circuit Doctor's pin data and the default bus pins.
| Pin | Sketch name | What it can do | Watch out for |
|---|---|---|---|
| VP | 36 | Digital in and out. Analog in. PWM. | 3.3 V logic. No internal pull-up or pull-down. |
| VN | 39 | Digital in and out. Analog in. PWM. | 3.3 V logic. No internal pull-up or pull-down. |
| EN | - | The board's EN pin. | Not a GPIO. The RST button is on this pin. |
| 34 | 34 | Digital in and out. Analog in. PWM. | 3.3 V logic. No internal pull-up or pull-down. |
| 35 | 35 | Digital in and out. Analog in. PWM. | 3.3 V logic. No internal pull-up or pull-down. |
| 32 | 32 | Digital in and out. Analog in. PWM. | 3.3 V logic. |
| 33 | 33 | Digital in and out. Analog in. PWM. | 3.3 V logic. |
| 25 | 25 | Digital in and out. Analog in. PWM. | 3.3 V logic. |
| 26 | 26 | Digital in and out. Analog in. PWM. | 3.3 V logic. |
| 27 | 27 | Digital in and out. Analog in. PWM. | 3.3 V logic. |
| 14 | 14 | Digital in and out. Analog in. PWM. | 3.3 V logic. |
| 12 | 12 | Digital in and out. Analog in. PWM. | 3.3 V logic. |
| GND | - | Ground. | - |
| 3V | - | A 3.3 V power pin: 3V. | Not a GPIO. |
| 22 | 22 | Digital in and out. PWM. The on-board LED is on this pin. | 3.3 V logic. |
| 19 | 19 | Digital in and out. PWM. I2C SDA (default). SPI MISO (default). | I2C and SPI share this pin by default: use one bus or the other. 3.3 V logic. |
| 23 | 23 | Digital in and out. PWM. I2C SCL (default). SPI MOSI (default). | I2C and SPI share this pin by default: use one bus or the other. 3.3 V logic. |
| 18 | 18 | Digital in and out. PWM. SPI SCK (default). | 3.3 V logic. |
| 5 | 5 | Digital in and out. PWM. SPI SS (default). | 3.3 V logic. |
| 17 | 17 | Digital in and out. PWM. | 3.3 V logic. |
| 16 | 16 | Digital in and out. PWM. | 3.3 V logic. |
| 4 | 4 | Digital in and out. Analog in. PWM. | 3.3 V logic. |
| 0 | 0 | Digital in and out. Analog in. PWM. | 3.3 V logic. |
| 2 | 2 | Digital in and out. Analog in. PWM. | 3.3 V logic. |
| 15 | 15 | Digital in and out. Analog in. PWM. | 3.3 V logic. |
| 13 | 13 | Digital in and out. Analog in. PWM. | 3.3 V logic. |
| BAT+ | - | The board's BAT+ pin. | Not a GPIO. Open: the charger and a battery are not modeled. |
| BAT- | - | Ground. | The battery socket is ground. |
| _RF | - | The board's _RF pin. | Not a GPIO. |
How to read the table
The Pin column is what is printed on the board. The silkscreen numbers are the GPIO numbers, so the Sketch name column repeats them. VP and VN are GPIO 36 and 39, and a sketch writes 36 and 39. BAT+ and BAT- are the two contacts of the battery socket.
A hole that has no sketch name is a supply, a ground or a control pin. It is listed so the table matches the board, hole for hole.
Power and ground pins
The LOLIN32 Lite has 2 ground holes in its pin list. Its 3.3 V pins are 3V. Pins named for a job, not for a GPIO, are EN, BAT+ and _RF. A sketch cannot drive any of these with digitalWrite.
PWM and analog pins
Every GPIO pad can drive PWM with analogWrite: every GPIO pad.
These pins can read an analog voltage with analogRead: 36, 39, 34, 35, 32, 33, 25, 26, 27, 14, 12, 4, 0, 2, 15 and 13. The pins run at 3.3 V.
The default I2C and SPI pins
Wire uses SDA on 19 and SCL on 23.
SPI uses SCK on 18, MISO on 19, MOSI on 23 and SS on 5.
Which pin should I use for what?
For an LED, a buzzer or a switch, any GPIO row in the table will do. For dimming, pick a PWM pin: every GPIO pad. For a potentiometer or an analog sensor, use 36, 39, 34, 35, 32, 33, 25, 26, 27, 14, 12, 4, 0, 2, 15 and 13. For an I2C module, wire SDA to 19 and SCL to 23. For an SPI module, wire SCK to 18, MISO to 19 and MOSI to 23, and use 5 for SS. The pins run at 3.3 V logic.
The LED
The blue LED is on GPIO 22, wired from 3.3 V to the pin, so it lights when the pin is LOW. LED_BUILTIN is 22, and digitalWrite(LED_BUILTIN, LOW) turns it on.
This is the opposite of many Arduino boards, where HIGH turns the LED on. If your LED seems backwards, try inverting your logic.
Buttons
The board has one button, RST, on EN. There is no BOOT button on the board. On the real board the USB chip pulls GPIO 0 low to start the loader.
The board's BOOT poke in Mokxi does the same thing. It is a property of the board, not a physical pin.
What is wired to the board
A micro-USB socket goes through a CH340 to UART0, which is the serial monitor. A JST socket at the foot takes a LiPo cell. BAT+ and BAT- are the socket's two contacts, and BAT- is ground.
The charger and a battery are not modeled, so BAT+ is left open. The board runs from USB as long as the simulation does. GPIO 1 and 3 go only to the USB chip, so they do not appear on the headers.
I2C and other pin jobs
The Wire library uses 19 for SDA and 23 for SCL, matching the Arduino IDE's LOLIN32 Lite board. SPI defaults to SCK on 18, MISO on 19, MOSI on 23, and SS on 5.
The logic voltage is 3.3 V. Inputs on pins 34, 35, 36 and 39 cannot be outputs, so use other pins for LEDs and motors.
What the model has
Mokxi models the ESP32 DevKit V1 chip whole on this board: one Xtensa LX6 core, GPIO, UART0, the timers, ADC1 and LEDC PWM. The board carries its own program string, so it is offered its own examples, built for its LED and its I2C pins.
WiFi joins a simulated network, with the network name and password as properties of the board. There is no radio, no 802.11 and no real internet. A micro-USB socket goes through a CH340 to UART0, which is the serial monitor.
Open this circuit in the editor. LOLIN32 Lite: a button lights the LED, wired as it runs at the top of this page. Change a part or a value and run it again.
Open the circuitQuestions
What are the LOLIN32 Lite I2C pins?
SDA is 19 and SCL is 23.
What are the LOLIN32 Lite SPI pins?
SCK is 18, MISO is 19, MOSI is 23 and SS is 5.
How do I turn on the LED on the LOLIN32 Lite?
The blue LED is on GPIO `22` and lights when the pin is `LOW`. Use `digitalWrite(LED_BUILTIN, LOW)` to turn it on.
Where is the 5V pin on the LOLIN32 Lite?
There is no 5 V pin. The board runs at 3.3 V logic.
What are the VP and VN pins?
`VP` is GPIO `36` and `VN` is GPIO `39`. Both are inputs only.
Which pins are I2C on the LOLIN32 Lite?
`Wire` uses `19` for `SDA` and `23` for `SCL`, the same as the Arduino IDE's LOLIN32 Lite board.
Where are TX and RX on this board?
There are no `TX` or `RX` pins. GPIO `1` and `3` go only to the USB chip, which is the serial monitor.
Build this for real
Open the editor, change a value and watch the number move with it. Nothing to install, and no account needed.