M5Stack-Station
by M5 Stack
ESP32 board in a dock-style enclosure - built for desktop-style IoT dashboards and HMI stations.

On this page
M5Stack-Station Pinout
21 pins| Pin | GPIO | Labels | Status | Capabilities | Notes |
|---|---|---|---|---|---|
| 1 | 1 | TXG1 | uart | uart | |
| 2 | 3 | RXG3 | uart | uart | |
| 3 | 4 | G4 | safe | - | |
| 4 | 5 | SSG5 | strapping | spi | |
| 5 | 13 | RXD1G13 | strapping | - | |
| 6 | 14 | TXD1G14 | strapping | - | |
| 7 | 16 | RXD2G16 | safe | - | |
| 8 | 17 | TXD2G17 | safe | - | |
| 9 | 18 | SCKG18 | safe | spi | |
| 10 | 19 | G19 | safe | - | |
| 11 | 23 | MOSIG23 | safe | spi | |
| 12 | 25 | G25DAC1 | safe | dac | |
| 13 | 26 | G26DAC2 | safe | dac | |
| 14 | 32 | SDAG32 | safe | i2c | |
| 15 | 33 | SCLG33 | safe | i2c | |
| 16 | 35 | G35ADC1 | strapping | - | |
| 17 | 36 | G36ADC2 | strapping | - | |
| 18 | 37 | G37 | strapping | - | |
| 19 | 38 | G38 | strapping | - | |
| 20 | 39 | G39 | strapping | - | |
| 21 | - | MISO | safe | spi |
Start with these
10 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
10 pins · 7 things to knowTXGPIO1 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.
RXGPIO3 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.
SSGPIO5 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.
RXD1GPIO13 JTAG clock pin (TCK); also ADC2 channel 4 / Touch4 input. JTAG
Used for JTAG debugging (TCK); avoid using as GPIO if JTAG is needed.
TXD1GPIO14 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.
G35GPIO35G37GPIO37G38GPIO38G39GPIO39 Input-only GPIOs with ADC1 channels - no output driver Other
Cannot be used as output; only suitable for input.
- G35Input-only GPIO (no output driver); ADC1 channel 7.
- G37Input-only GPIO (no output); ADC1 channel 1.
- G38Input-only GPIO (no output); ADC1 channel 2.
- G39Input-only GPIO (no output); ADC1 channel 3, Hall sensor VN.
G36GPIO36 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).
The M5Stack-Station pinout brings out 21 pins - 20 usable GPIO.
Peripheral wiring is straightforward: I²C is mapped to SDA on GPIO32 and SCL on GPIO33; 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 2 true DAC outputs.
10 of the exposed pins carry boot-time or system duties on the ESP32 (TX, RX, SS and 7 more) - check the guidance above before wiring anything to them. G4, RXD2, TXD2, SCK and 6 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: 16MB (128Mb) Flash Mode: DIO Partition Scheme: 16M Flash (3MB APP/9.9MB FATFS) Upload Speed: 921600
// toggle GPIO4 - wire an LED and resistor to it
void setup() {
pinMode(4, OUTPUT);
}
void loop() {
digitalWrite(4, HIGH); delay(500);
digitalWrite(4, LOW); delay(500);
}[env:m5stack-station]
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 - GPIO4
output:
- platform: gpio
pin: 4
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).Specifications
ESP32 · 88 × 65 mm · vs other ESP32 chips →Dimensions
About this board
Inside sits the ESP32 - a dual-core Xtensa with both Bluetooth Classic and BLE.
At $48.50 it's on the expensive side for an ESP32 board - most land around $20.
Around the module: an IPS LCD 1.14" 240x135 display, a BM8563 RTC, an addressable RGB LED, an RS485 interface (SP3485), battery charging (AXP192) and 3 programmable/Power buttons.
- 7x SK6812 addressable RGB LEDs
- USB-A 5V power output port
- Reserved LiPo battery socket (battery not included)
Where to buy
prices are typical street prices
Resources
Similar boards




