Skip to content

board configs: one remote-display config for every board with no screen - #836

Merged
bdbarnett merged 1 commit into
mainfrom
nodisplay-generic-config
Nov 25, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
nodisplay-generic-config

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

A board with no screen can now install one board config, nodisplay/remote-display, beside its own board_peripherals package and get a 480x320 display in any browser on its network. The config names no pins: it makes a RemoteDisplay that asks for the WebREPL password, binds whichever board_peripherals is installed, and turns the board's buttons into keypad when that module has a keypad(). Size, port and password come from OMNIPYTHON_WIDTH, OMNIPYTHON_HEIGHT, OMNIPYTHON_REMOTE_PORT and OMNIPYTHON_REMOTE_PASSWORD. With no password at all the import raises rather than leave the display open to the network. Moving a board to a real display means installing that display's config, which replaces board_config.py and leaves the apps alone.

Two boards get their own packages in nodisplay. The ESP32-Audio-Kit's board_peripherals moves out of ili9341_esp32_audio_kit into esp32_audio_kit, which the ILI9341 config now requires, and it gains the green LED and KEY1-KEY6. The new adafruit_feather_esp32_v2 has the NeoPixel, red LED, STEMMA QT I2C, battery monitor, Wi-Fi and BLE, with SW38 as its keypad(). Its pins come from Adafruit's pinout. The HX8357 FeatherWing config now requires it instead of carrying an I2C-only copy. The existing headless boards needed no code changes, because none of them reads anything from board_config that it doesn't already look up as optional. Their docstrings now point at the new config.

How it was checked: on MicroPython's unix port, Home (started as apps/home/main.py starts it, without net.boot(), since unix has no network) and the Bluetooth Receiver both ran through this config, with the password taken from a webrepl_cfg.py. I opened each in headless Chromium, entered the password and saw them drawn. A click on Home's Bluetooth Receiver tile opened the app. tests/test_remote_display_config.py covers the defaults, the environment settings, the refusal without a password, the keypad and the rule that no headless package ships a board_config.py. Each check was made to fail once by breaking the config on purpose. libbuild.py check, installers --check, the board, omip and remotedisplay tests and the Sphinx build pass. None of this has run on a board yet: the Feather's roles, the kit's LED and keys, and keypad() on real pins are still unchecked.

nodisplay/remote-display is a board_config.py with no pins: a 480x320
RemoteDisplay in a web browser, asking for the WebREPL password, that binds
whichever board_peripherals is installed beside it and builds the board's
buttons into keypad when that module has a keypad(). A board with no display
installs it next to its own package; fitting a real display later means
installing that display's config, and the apps stay.

The ESP32-Audio-Kit and the Adafruit ESP32 Feather V2 get board_peripherals
packages of their own in nodisplay (the kit's moves out of its ILI9341
config, which now requires it, and gains its LED and KEY1-KEY6; the Feather's
has the NeoPixel, LED, STEMMA QT, battery and SW38), so each works with the
remote-display config or with its display's.

Checked on MicroPython's unix port: Home and the Bluetooth Receiver started
through this config and were drawn and clicked in Chromium after the
password prompt; tests/test_remote_display_config.py covers the password,
the environment settings and the keypad.
@bdbarnett
bdbarnett merged commit 67d668c into main Nov 25, 2026
7 checks passed
@bdbarnett
bdbarnett deleted the nodisplay-generic-config branch November 25, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant