Skip to main content

bbr-buttonboard

Python client for the BBR Button Board, a modular driver station panel for FIRST robotics.

The board works as a game controller with nothing installed. This library is for making the panel react to the robot: a short script on the Driver Station laptop reads robot state (from NetworkTables, in FRC) and sets key colours, display text and pictures to match.

Install

pip install bbr-buttonboard

Python 3.9 or newer. The only dependency is pyserial. Two extras:

pip install "bbr-buttonboard[pictures]"       # Pillow, to load images onto display tiles
pip install "bbr-buttonboard[networktables]"  # pyntcore, for the companion app

A first script

from buttonboard import Board

with Board.open() as board:          # finds the port by itself
    leds = board.led_layer()

    while True:
        arm_fault = read_from_networktables("arm_fault")
        in_range = read_from_networktables("in_scoring_range")

        leds.set(3, "red" if arm_fault else "off")
        leds.set(7, "green" if in_range else "off", fx="breathe")
        leds.flush()                 # sends only what changed

Display tiles take text the same way:

board.screen(5).text(0, "ABORT", fg="black", bg="red").flush()

MockBoard is an in-process board, so a script can be written and tested with no hardware attached:

from buttonboard import MockBoard

board = MockBoard()
board.led(3, "red")
print(board.state.leds)              # {('btn', 3): 'led 3 FF0000'}

Only one program can have the board open at a time. Close the config app's browser tab before running a script, and the other way round.

bbctl

Installing the package also installs bbctl, a console for the board's config channel:

bbctl                       # interactive
bbctl hello stats           # run commands and exit
bbctl -p COM7 "led reset"   # explicit port

Documentation

Tests

python tests/test_buttonboard.py

No hardware and no pytest needed.

About this repository

This is a published copy of the library. It is developed alongside the Button Board firmware and exported here for each release, so a pull request is welcome but will be applied upstream and come back in the next export.

The § references in the source point into the Button Board protocol specification, which is not published yet.

Licence

MIT. See LICENSE.

Metadata

Release files for bbr-buttonboard 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bbr-buttonboard 0.1.0
File Size Uploaded Provenance Actions
bbr_buttonboard-0.1.0.tar.gz 61.2 kB With provenance Details for bbr_buttonboard-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bbr-buttonboard 0.1.0
File Interpreter ABI Platform Actions
bbr_buttonboard-0.1.0-py3-none-any.whl Python 3 none any Details for bbr_buttonboard-0.1.0-py3-none-any.whl

Total release size: 117.8 kB

Release files / bbr_buttonboard-0.1.0.tar.gz

Download URL bbr_buttonboard-0.1.0.tar.gz
Size 61.2 kB
Tags Source
SHA-256 checksum
How to use checksums
eb6e6b6cd87e2b9b01167f0c83013e7c4e1765bbb8bfd9107ede6d7af711121d
BLAKE2b-256 checksum
How to use checksums
154a4a9175d72f41ba99e74243dd337fd6ebd1b07d1faa3bfaeecade85e99ce9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / bbr_buttonboard-0.1.0-py3-none-any.whl

Download URL bbr_buttonboard-0.1.0-py3-none-any.whl
Size 56.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3006a6f3ebd667bc56e8d02115f6416d8c50dfec1b3cf0ed8ebe52628726ad0b
BLAKE2b-256 checksum
How to use checksums
f74e7d818c7caf7df356c3ac7eab942966ea775748d7bd4b7e5740d05b947123
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Security for bbr-buttonboard 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bbr_buttonboard-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page