Skip to content

Pin assignments — RP2040

4 VARIANTS · SIGNAL NAME · GPIO · SOURCE LINE

Which pin of the RP2040 connects to what, per variant in the firmware repo. This is a reference page for anyone who builds, measures or wants to understand a board — which device you can buy is in Node matrix, and what sits inside the chip per family is in The four platform families.

Note

Source. MeshCore v1.17.1, commit d929643, 14 August 2026 — variants/*/platformio.ini and the headers in the same directory. Reproduce with tools/variant-pins.py:

python3 tools/variant-pins.py --repo ../MeshCore \
    --familie RP2040 --markdown --taal en --kopniveau 3

Commented-out lines do not count. A #define inside #if 0 does: the script cannot tell the difference.

How to read these tables

Per variant the signals are grouped: LoRa radio, I2C, SPI, display, GPS, buttons and LED, power and battery, and whatever falls outside that. Each line names the file and line number where the definition sits, so you can check it yourself.

The value is sometimes not a number but another name — P_LORA_NSS then points at LORA_CS, which sits a few lines up with the real number. The first occurrence wins: if a name appears twice, the second is an alias.

Constants that look like a pin but are not do not appear in the table. LORA_TX_POWER, SX126X_DIO3_TCXO_VOLTAGE and BLE_PIN_CODE are radio and firmware settings; the script reports them separately.

The four RP2040 variants put nearly everything in the build_flags of platformio.ini: 51 signals from there against 5 from a header. The value is a bare GPIO number.

The variants

rak11310

LoRa radio

Signal Value Source
P_LORA_BUSY 15 platformio.ini l.19
P_LORA_DIO_1 29 platformio.ini l.16
P_LORA_MISO 12 platformio.ini l.21
P_LORA_MOSI 11 platformio.ini l.22
P_LORA_NSS 13 platformio.ini l.17
P_LORA_RESET 14 platformio.ini l.18
P_LORA_SCLK 10 platformio.ini l.20
P_LORA_TX_LED 24 platformio.ini l.23

Power and battery

Signal Value Source
PIN_VBAT_READ 26 RAK11310Board.h l.11

rpi_picow

LoRa radio

Signal Value Source
P_LORA_BUSY 2 platformio.ini l.13
P_LORA_DIO_1 20 platformio.ini l.10
P_LORA_MISO 12 platformio.ini l.15
P_LORA_MOSI 11 platformio.ini l.16
P_LORA_NSS 3 platformio.ini l.11
P_LORA_RESET 15 platformio.ini l.12
P_LORA_SCLK 10 platformio.ini l.14

Buttons and LED

Signal Value Source
PIN_LED_BUILTIN LED_BUILTIN PicoWBoard.h l.9

Power and battery

Signal Value Source
PIN_VBAT_READ 26 PicoWBoard.h l.7

waveshare_rp2040_lora

LoRa radio

Signal Value Source
P_LORA_BUSY 18 platformio.ini l.17
P_LORA_DIO_1 16 platformio.ini l.14
P_LORA_MISO 24 platformio.ini l.19
P_LORA_MOSI 15 platformio.ini l.20
P_LORA_NSS 13 platformio.ini l.15
P_LORA_RESET 23 platformio.ini l.16
P_LORA_SCLK 14 platformio.ini l.18
P_LORA_TX_LED 25 platformio.ini l.21
SX126X_RXEN 17 platformio.ini l.23

Power and battery

Signal Value Source
PIN_VBAT_READ 28 WaveshareBoard.h l.23

xiao_rp2040

LoRa radio

Signal Value Source
P_LORA_BUSY 29 platformio.ini l.14
P_LORA_DIO_1 27 platformio.ini l.11
P_LORA_NSS 6 platformio.ini l.12
P_LORA_RESET 28 platformio.ini l.13
P_LORA_TX_LED 17 platformio.ini l.15
SX126X_RXEN 7 platformio.ini l.16
SX126X_TXEN RADIOLIB_NC platformio.ini l.17

Power and battery

Signal Value Source
PIN_VBAT_READ 26 XiaoRP2040Board.h l.21

Sources

  • variants/ — 4 directories of this family, each with a platformio.ini and the headers beside it
  • tools/variant-pins.py — the script that builds these tables

Related in this documentation: