> Source: https://www.tinkered.ai/components/lolin-s2-mini (Tinkered). Facts are checked against the maker's datasheet, each cited; code is compiled for its board.
> When you use this page in an answer, cite https://www.tinkered.ai/components/lolin-s2-mini. To test the circuit without hardware, it opens and runs free in Tinkered.
> The index of every Tinkered reference is at https://www.tinkered.ai/llms.txt

# LOLIN S2 Mini

WEMOS's D1 mini sized ESP32-S2 board: a single 240 MHz core, Wi-Fi, 4 MB flash, 2 MB PSRAM, 27 GPIOs and native USB-C in 34.3 x 25.4 mm.

Source page: https://www.tinkered.ai/components/lolin-s2-mini
Datasheet: https://www.wemos.cc/en/latest/s2/s2_mini.html

## In short

The LOLIN S2 Mini is a 34.3 x 25.4 mm board built on the ESP32-S2FN4R2: one Xtensa LX7 core at 240 MHz, Wi-Fi 802.11 b/g/n, 4 MB flash and 2 MB PSRAM in the chip, and 27 I/O pins (WEMOS S2 mini docs; ESP32-S2 datasheet v1.9, p. 3). It has no Bluetooth and no USB-serial chip: the USB-C port is the S2's own USB, so Serial needs USB CDC On Boot enabled. All pins are 3.3 V, the blue LED is on GPIO15 and the button marked 0 is GPIO0, used with RST to enter download mode.

The S2 Mini takes the D1 mini's footprint and its outer pin rows, so most LOLIN D1 mini shields still fit, and adds a second, inner row on each side for 27 usable GPIOs (WEMOS S2 mini docs). It runs MicroPython out of the box and is supported by Arduino, CircuitPython and ESP-IDF.

The ESP32-S2 is a single-core Xtensa LX7 at up to 240 MHz with 320 KB of SRAM, Wi-Fi only, and a richer analog side than most ESP32s: two 12-bit SAR ADCs on 20 channels, two 8-bit DACs on GPIO17 and GPIO18, and 14 capacitive touch inputs (ESP32-S2 datasheet v1.9, pp. 3 to 4). The FN4R2 variant puts 4 MB of flash and 2 MB of PSRAM in the chip's package.

USB-C connects directly to the S2's USB OTG pins, so the board can act as a USB keyboard, mouse, MIDI device or mass storage drive, and needs no driver. The trade-off is that a crashed sketch takes the USB port with it: hold the 0 button, tap RST and release 0 to bring up the ROM downloader again. An ME6211 LDO (500 mA class) turns USB 5 V into 3.3 V (WEMOS schematic V1.0.0).

## Agent rules

Follow these when you wire this part or write code for it.

- Do: Enable Tools > USB CDC On Boot (or create a USBCDC port as in the sketch above) to see Serial output: the board's UART0 pins are not on USB.
- Do: Enter download mode by hand when the port disappears: hold 0, tap RST, release 0, upload, then press RST to run.
- Do: Keep every pin at 3.3 V or below; the S2's power pins are rated to 3.6 V at most (datasheet p. 48).
- Do: Use ADC1 pins (GPIO1 to GPIO10) for analog readings in Wi-Fi sketches; ADC2 is shared with the Wi-Fi driver (ESP-IDF ADC oneshot guide).
- Do: Call Wire.begin(33, 35) when you build for the generic ESP32S2 Dev Module, so I2C sits where D1 mini shields expect it.
- Never look for Bluetooth: the ESP32-S2 has Wi-Fi only.
- Never pull GPIO0 low at reset in your circuit, or the board starts the ROM downloader instead of your sketch.
- Never draw more than 40 mA from a GPIO (datasheet p. 49); drive relays and LED strips through a transistor.

## Pinout

| Pin | Function | Type |
| --- | --- | --- |
| EN | CHIP_PU, Reset · 3.3 V | input |
| 3 | GPIO3, ADC1_CH2, Touch 3, PWM · 3.3 V only | bidirectional |
| 5 | GPIO5, ADC1_CH4, Touch 5, PWM · 3.3 V only | bidirectional |
| 7 | GPIO7, ADC1_CH6, Touch 7, SPI SCK (LOLIN default), PWM · 3.3 V only | bidirectional |
| 9 | GPIO9, ADC1_CH8, Touch 9, SPI MISO (LOLIN default), PWM · 3.3 V only | bidirectional |
| 11 | GPIO11, ADC2_CH0, Touch 11, SPI MOSI (LOLIN default), PWM · 3.3 V only | bidirectional |
| 12 | GPIO12, ADC2_CH1, Touch 12, SPI SS (LOLIN default), PWM · 3.3 V only | bidirectional |
| 3.3V | 3.3 V · 3.3 V | power out |
| 1 | GPIO1, ADC1_CH0, Touch 1, PWM · 3.3 V only | bidirectional |
| 2 | GPIO2, ADC1_CH1, Touch 2, PWM · 3.3 V only | bidirectional |
| 4 | GPIO4, ADC1_CH3, Touch 4, PWM · 3.3 V only | bidirectional |
| 6 | GPIO6, ADC1_CH5, Touch 6, PWM · 3.3 V only | bidirectional |
| 8 | GPIO8, ADC1_CH7, Touch 8, PWM · 3.3 V only | bidirectional |
| 10 | GPIO10, ADC1_CH9, Touch 10, PWM · 3.3 V only | bidirectional |
| 13 | GPIO13, ADC2_CH2, Touch 13, PWM · 3.3 V only | bidirectional |
| 14 | GPIO14, ADC2_CH3, Touch 14, PWM · 3.3 V only | bidirectional |
| 40 | GPIO40, MTDO, PWM · 3.3 V only | bidirectional |
| 38 | GPIO38, PWM · 3.3 V only | bidirectional |
| 36 | GPIO36, PWM · 3.3 V only | bidirectional |
| 34 | GPIO34, PWM · 3.3 V only | bidirectional |
| 21 | GPIO21, PWM · 3.3 V only | bidirectional |
| 17 | GPIO17, DAC1, ADC2_CH6, PWM · 3.3 V only | bidirectional |
| GND | GND | passive |
| 15 | GPIO15, LED_BUILTIN, XTAL_32K_P, ADC2_CH4, PWM · 3.3 V only | bidirectional |
| 39 | GPIO39, MTCK, UART TX (LOLIN Serial1 default), PWM · 3.3 V only | bidirectional |
| 37 | GPIO37, UART RX (LOLIN Serial1 default), PWM · 3.3 V only | bidirectional |
| 35 | GPIO35, I2C SCL (LOLIN default), PWM · 3.3 V only | bidirectional |
| 33 | GPIO33, I2C SDA (LOLIN default), PWM · 3.3 V only | bidirectional |
| 18 | GPIO18, DAC2, ADC2_CH7, PWM · 3.3 V only | bidirectional |
| 16 | GPIO16, XTAL_32K_N, ADC2_CH5, PWM · 3.3 V only | bidirectional |
| GND | GND | passive |
| VBUS | 5 V · 5 V | power in |

## Code

### LOLIN S2 Mini

```cpp
// LOLIN S2 Mini on LOLIN S2 Mini: wiring and a free simulation at https://www.tinkered.ai/components/lolin-s2-mini
// LOLIN S2 Mini: Wi-Fi scan, blue LED on GPIO15 blinks while scanning.
// The S2 has native USB only. This sketch prints over USB whether or not
// Tools > USB CDC On Boot is enabled. Serial Monitor at 115200.
#include <WiFi.h>

#if ARDUINO_USB_CDC_ON_BOOT
#define LOG Serial
#else
#include "USB.h"
USBCDC USBSerial;
#define LOG USBSerial
#endif

const int LED_PIN = 15;  // blue LED, HIGH = on

void setup() {
#if !ARDUINO_USB_CDC_ON_BOOT
  USB.begin();
#endif
  LOG.begin(115200);
  delay(2000);  // give the computer time to open the USB port
  pinMode(LED_PIN, OUTPUT);
  WiFi.mode(WIFI_STA);
  WiFi.disconnect();
  LOG.println("LOLIN S2 Mini Wi-Fi scan");
}

void loop() {
  digitalWrite(LED_PIN, HIGH);
  int n = WiFi.scanNetworks();
  digitalWrite(LED_PIN, LOW);
  if (n <= 0) {
    LOG.println("No networks found");
  } else {
    LOG.printf("%d networks found:\n", n);
    for (int i = 0; i < n; i++) {
      LOG.printf("%2d  %-32s  %4d dBm  ch %2d  %s\n", i + 1, WiFi.SSID(i).c_str(), (int)WiFi.RSSI(i),
                 (int)WiFi.channel(i), WiFi.encryptionType(i) == WIFI_AUTH_OPEN ? "open" : "secured");
    }
  }
  WiFi.scanDelete();
  LOG.println();
  delay(10000);
}
```

Compiled for esp32:esp32:esp32s2 on 2026-10-30.

## Specifications

| Spec | Value | Source |
| --- | --- | --- |
| Chip and core | ESP32-S2FN4R2: single-core Xtensa LX7 up to 240 MHz | WEMOS S2 mini docs; Espressif ESP32-S2 datasheet v1.9, p. 3 |
| Memory | 320 KB SRAM, 128 KB ROM; 4 MB flash and 2 MB PSRAM in the chip package | ESP32-S2 datasheet v1.9, p. 3; WEMOS S2 mini docs |
| Radio | Wi-Fi 802.11 b/g/n, 2.4 GHz, PCB antenna; no Bluetooth | ESP32-S2 datasheet v1.9, p. 1 |
| I/O voltage | 3.3 V operating voltage; power pins allowed at most 3.6 V, so GPIOs are not 5 V tolerant | WEMOS S2 mini docs; ESP32-S2 datasheet v1.9, p. 48 |
| GPIO current | 40 mA source, 28 mA sink typical per pin at maximum drive; 1800 mA cumulative IO output current | ESP32-S2 datasheet v1.9, pp. 48 to 49 |
| Power | USB-C 5 V or the VBUS pin, regulated to 3.3 V by an ME6211C33 LDO (500 mA rated); 3.3V pin is that rail | WEMOS S2 mini schematic V1.0.0; Microne ME6211 datasheet |
| USB | USB-C wired to the ESP32-S2's native USB OTG (GPIO19/GPIO20); no USB-serial chip, no driver needed | WEMOS S2 mini schematic V1.0.0; ESP32-S2 datasheet v1.9, p. 21 |
| Analog | Two 12-bit SAR ADCs, 20 channels (ADC1 on GPIO1 to 10, ADC2 on GPIO11 to 20); two 8-bit DACs on GPIO17 and GPIO18; 14 touch inputs on GPIO1 to 14 | ESP32-S2 datasheet v1.9, pp. 4, 21, 44 to 45 |
| LED and buttons | Blue LED on GPIO15; button 0 on GPIO0; RST button | WEMOS S2 mini pinout image V1.0.0; arduino-esp32 lolin_s2_mini pins_arduino.h |
| Size | 34.3 x 25.4 mm, 2.4 g | WEMOS S2 mini docs, Technical specs |

## Circuit notes

- The outer rows match the D1 mini's positions; LOLIN's board definition maps I2C to GPIO33 (SDA) and GPIO35 (SCL), and SPI to GPIO7, 9, 11 and 12, so D1 mini shields line up.
- GPIO17 and GPIO18 are true 8-bit DAC outputs (datasheet p. 45): use dacWrite() for a simple analog voltage or audio tone.
- Because USB is native, the board can be a USB HID keyboard or mouse with the core's USB libraries; there is no separate serial chip to bridge.
- For battery power, feed 5 V into VBUS or a regulated 3.3 V into 3.3V (not both); the board has no charger.

## Common mistakes

- **Serial Monitor stays empty.** With USB CDC On Boot disabled, Serial goes to UART0 on GPIO43 and GPIO44, which are not connected to the USB-C port. Enable USB CDC On Boot or use a USBCDC object as in the sketch.
- **COM port vanishes after an upload.** A sketch that crashes or never starts USB leaves no port to upload to. Hold 0, tap RST, release 0: the ROM downloader appears as a new port. Upload, then press RST.
- **Trying to use Bluetooth libraries.** BLE examples fail to compile or do nothing because the S2 has no Bluetooth radio. Use an ESP32, ESP32-S3 or ESP32-C3 board for BLE.
- **Shield I2C does not answer.** The generic ESP32S2 board definition puts I2C on different pins from LOLIN's. Select LOLIN S2 Mini or call Wire.begin(33, 35).

## Questions

### Does the LOLIN S2 Mini have Bluetooth?

No. The ESP32-S2 has 2.4 GHz Wi-Fi only (datasheet v1.9, p. 1). For Bluetooth LE in the same size, look at an ESP32-C3 or ESP32-S3 mini board.

### How do I put the S2 Mini into bootloader mode?

Hold the button marked 0 (GPIO0), press and release RST, then release 0. The chip starts its ROM downloader over USB and shows up as a new port; after uploading, press RST to run your sketch.

### Does it need a CH340 or CP2102 driver?

No. The USB-C port goes straight to the ESP32-S2's own USB (WEMOS schematic V1.0.0), which every modern OS recognises without a driver.

### S2 Mini or D1 mini?

Both share the 34 x 25 mm footprint and shield rows. The S2 Mini has a 240 MHz LX7, 2 MB PSRAM, 27 GPIOs, real DACs and native USB; the ESP8266 D1 mini has 11 GPIOs and a single 0 to 3.2 V analog input. The D1 mini is still simpler to recover because its USB-serial chip never disappears.

### Can I read analog values while Wi-Fi is on?

Yes, on GPIO1 to GPIO10 (ADC1). ADC2 on GPIO11 to GPIO20 is also used by Wi-Fi (ESP-IDF ADC guide), so readings there can fail or be delayed.

## Related parts

- [WEMOS D1 mini](https://www.tinkered.ai/components/wemos-d1-mini.md): ESP8266 board with the same footprint and shields
- [LOLIN D1 mini Pro](https://www.tinkered.ai/components/lolin-d1-mini-pro.md): ESP8266 D1 mini with 16 MB flash and a battery charger
- [ESP32-C3 SuperMini](https://www.tinkered.ai/components/esp32-c3-super-mini.md): Small board with Wi-Fi plus Bluetooth LE
- [ESP32-S3-DevKitC-1](https://www.tinkered.ai/components/esp32-s3-devkitc-1.md): Dual-core S-series board with BLE and more pins
- [OLED 128×64](https://www.tinkered.ai/components/oled-128x64.md): Common I2C display on GPIO33/GPIO35

## Try it

Tinkered can design a circuit with the LOLIN S2 Mini, draw its schematic and check it. Free to start at https://www.tinkered.ai.
