Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions board_configs/nodisplay/pimoroni_pico_plus2_w/board_peripherals.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# SPDX-FileCopyrightText: 2026 Brad Barnett
#
# SPDX-License-Identifier: MIT

"""Lazy roles for the Pimoroni Pico Plus 2 W. PERIPHERALS = lazy roles only.

The Pico Plus 2 W (PIM726) is an RP2350B with 16 MB of flash, 8 MB of PSRAM
and an RM2 radio (CYW43439: Wi-Fi and Bluetooth), on a Pico-sized board with
a USB-C port. Pins are from Pimoroni's pinout and the firmware's pin table:

user LED on the radio's GPIO 0 (``Pin("LED")``), high = on
BOOT switch GP45, pulled up on the board: low when pressed. It
starts the bootloader only when held through a reset
Qw/ST connector I2C0, SDA GP4, SCL GP5
radio GP23, GP24, GP25 and GP29: leave them to it
PSRAM chip select GP47
VSYS monitor GP43 (ADC), through a divider
RESET button the chip's RUN line; no GPIO

It has no display and no audio. Install the ``remote-display`` board config
beside this package for a screen in a web browser.

Checked on a board with nothing attached: the LED takes writes, GP45 reads
high with the internal pull-down on (so the board's resistor holds it up),
I2C0 opens on GP4 and GP5 with nothing on it, Wi-Fi joins, BLE starts, and
the ``remote-display`` board config draws beside this package.
Not checked, for want of hands or hardware: the LED by eye, a press of the
switch, and anything on the Qw/ST connector.
"""

import sys

import boarddev

PERIPHERALS = frozenset({"led", "i2c", "wlan", "ble"})

_BUTTON = 45
_SDA = 4
_SCL = 5


def load_peripherals(ns):
boarddev.bind_lazy(ns, sys.modules[__name__])


def led():
"""The user LED on the radio's GPIO 0, a ``machine.Pin``: ``led(1)`` turns it on."""
from machine import Pin

return Pin("LED", Pin.OUT, value=0)


def i2c():
"""The Qw/ST connector's I2C (I2C0 on GP4 and GP5), at 400 kHz."""
from machine import I2C, Pin

return I2C(0, sda=Pin(_SDA), scl=Pin(_SCL), freq=400_000)


def keypad():
"""The BOOT switch as the Enter key, for a board config to give the app as ``keypad``."""
import keys
from keypad_gpio import GPIOButtons
from machine import Pin

# The board's own resistor holds GP45 high.
return GPIOButtons({"boot": (Pin(_BUTTON, Pin.IN), keys.K_RETURN)})


def wlan():
import network

return network.WLAN(network.STA_IF)


def ble():
# A bledev adapter (docs/guides/bluetooth-le.md). It also answers every
# bluetooth.BLE method, so code written for the raw radio keeps working.
# Without bledev (or aioble) installed, the raw radio.
try:
import bledev.mpble
except ImportError:
import bluetooth

return bluetooth.BLE()
return bledev.mpble.get()
14 changes: 14 additions & 0 deletions board_configs/nodisplay/pimoroni_pico_plus2_w/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-FileCopyrightText: 2026 Brad Barnett
#
# SPDX-License-Identifier: MIT

# The pimoroni_pico_plus2_w board package: what mip.install("pimoroni_pico_plus2_w") brings.
metadata(
description="board_peripherals for the Pimoroni Pico Plus 2 W, on MicroPython",
version="0.1.0",
)

require("omnipython")
require("keypad_gpio")

module("board_peripherals.py")
21 changes: 21 additions & 0 deletions board_configs/nodisplay/pimoroni_pico_plus2_w/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"urls": [
[
"board_peripherals.py",
"github:PyDevices/omnipython/board_configs/nodisplay/pimoroni_pico_plus2_w/board_peripherals.py"
],
[
"keypad_gpio.py",
"github:PyDevices/omnipython/drivers/input/keypad_gpio.py"
]
],
"deps": [
[
"omnipython",
"latest"
]
],
"version": "0.1.0",
"description": "board_peripherals for the Pimoroni Pico Plus 2 W, on MicroPython",
"generated": "from manifest.py by tools/libbuild.py installers; edit manifest.py, not this"
}
21 changes: 21 additions & 0 deletions board_configs/nodisplay/pimoroni_pico_plus2_w/tested.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"board": "pimoroni_pico_plus2_w",
"runs": [
{
"hardware": "Pimoroni Pico Plus 2 W (RP2350B, 16 MB flash, 8 MB PSRAM), nothing attached, with the remote-display board config",
"firmware": "micropython 1.30.0 (Pimoroni Pico Plus 2 W with RP2350), v1.30.0-preview.322.gb9620707e3 on 2026-11-25 (GNU 14.2.1 MinSizeRel)",
"date": "2026-11-25",
"smoke": "passed",
"checks": [
"board_config imports",
"display draws",
"ble answers",
"i2c answers",
"led answers",
"wlan answers"
],
"skipped": [],
"tool": "tools/mark_tested.py"
}
]
}
1 change: 1 addition & 0 deletions docs/boards/board-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ that display's board config instead, and keeps its apps.
| `nodisplay/esp32-p4-wifi6-dev-kit` | Waveshare ESP32-P4-WIFI6-DEV-KIT (MicroPython; `audio_out`, `pcm_out`, `pcm_in`, `audio_power`, `i2c`, `sdcard`, `camera`, `ethernet`, `radio`, `wlan`, `ble`, `boot_button`, `usb_device`) |
| `nodisplay/qtpy_esp32_pico_audio_bff` | QT Py ESP32 Pico + Adafruit Audio BFF (MicroPython; `audio_out` on I2S, `boot_button`) |
| `nodisplay/esp32-s31-zero` | Waveshare ESP32-S31-Zero (MicroPython; `pixels`, `boot_button`, `wlan`, `ble`) |
| `nodisplay/pimoroni_pico_plus2_w` | Pimoroni Pico Plus 2 W (MicroPython; `led`, `i2c`, `wlan`, `ble`; the BOOT switch as `keypad()`) |
| `cp/nodisplay/qtpy_esp32_pico_audio_bff` | the same, on CircuitPython (`audio_out` is `audiobusio.I2SOut`) |

### Desktop and browser
Expand Down