Skip to content

Add Raspberry Pi Pico / Pico W + Dragino SX1276 variants - #3556

Open
LegoManACM wants to merge 2 commits into
meshcore-dev:devfrom
LegoManACM:feature/pico-dragino-sx1276
Open

LegoManACM wants to merge 2 commits into
meshcore-dev:devfrom
LegoManACM:feature/pico-dragino-sx1276

Conversation

@LegoManACM

Copy link
Copy Markdown

Adds board variants for a Raspberry Pi Pico or Pico W wired to a Dragino LoRa shield (SX1276, PA_BOOST output), a cheap, easy-to-find combination for building a MeshCore node by hand.

Wiring (SPI0)

Signal Pico GPIO
SCK 18
MOSI 19
MISO 16
NSS 17
DIO0 6
DIO1 7
RESET 8
GPS TX / RX (optional, UART0) 12 / 13

Envs

Variant Envs
pico_dragino_sx1276 (Pico) pico_dragino_repeater, pico_dragino_room_server, pico_dragino_companion_radio_usb
pico_w_dragino_sx1276 (Pico W) the same three as pico_w_dragino_*, plus pico_w_dragino_companion_radio_ble

Notes

  • Board class: PicoDraginoBoard is a thin subclass of WaveshareBoard (from waveshare_rp2040_lora). It reports its own manufacturer name and no battery voltage, because this wiring has no battery sense divider.
  • Radio: LORA_TX_POWER=20 and SX127X_CURRENT_LIMIT=240. Frequency, bandwidth and SF come from the global defaults, like the other variants.
  • Bluetooth: the BLE env uses the existing helpers/rp2040/SerialBLEInterface.

Also included: RP2040 GPS fix

EnvironmentSensorManager::initBasicGPS() calls Serial1.setPins(), which arduino-pico's SerialUART doesn't have (its equivalent is setPinout(tx, rx)). As a result, ENV_INCLUDE_GPS=1 doesn't compile on RP2040. This adds an RP2040_PLATFORM branch. It's a separate commit, so it's easy to drop if you'd rather take it on its own.

Testing

  • All 7 envs build with framework-arduinopico 1.60100.0.
  • Running on real hardware, from my local branch (same pins and radio setup):
    • Pico W repeater: boots, the SX1276 initialises and receives packets, and GPS is detected.
    • Pico USB companion: works with the MeshCore web app and transmits and receives over LoRa. It ran at 17 dBm. At 20 dBm this particular unit locked up on transmit, which I suspect is a power or cable issue on my bench, since the Pico W is fine at 20.
  • Build-only, not hardware-tested: both room servers, pico_dragino_repeater, and the Pico W USB and BLE companions.

🤖 Generated with Claude Code

LegoManACM and others added 2 commits October 5, 2026 19:02
arduino-pico's SerialUART has no setPins(); it uses setPinout(tx, rx).
Without this, any RP2040 variant with ENV_INCLUDE_GPS fails to build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Raspberry Pi Pico and Pico W wired to a Dragino LoRa shield (SX1276) on
SPI0, with optional NMEA GPS on UART0. PicoDraginoBoard extends the
WaveshareBoard class from waveshare_rp2040_lora, reporting its own name
and no battery voltage (this wiring has no battery sense divider).

Envs: repeater, room server and USB companion for both boards, plus a
BLE companion for the Pico W.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant