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.1

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.1
File Size Uploaded Provenance Actions
bbr_buttonboard-0.1.1.tar.gz 61.9 kB With provenance Details for bbr_buttonboard-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 118.7 kB

Release files / bbr_buttonboard-0.1.1.tar.gz

Download URL bbr_buttonboard-0.1.1.tar.gz
Size 61.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2632ac8619fd30853b772d92b0843fdf5770e6b3fb1a1c12154524e155eb1a9b
BLAKE2b-256 checksum
How to use checksums
e6dd7764a9ece35c3bfd683615a8f7ce2287fce36ea7f84e5cb5caa8ecb37a06
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 31, 2026.

Transparency log

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

Download URL bbr_buttonboard-0.1.1-py3-none-any.whl
Size 56.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
918fdf52a5298f42cab88dd7f1f368d56414f7946a67659089ecfd254a3bf7b3
BLAKE2b-256 checksum
How to use checksums
816d651a4569ff7edb334577619ed6e2d6248792890c921a38579f9bf9c4100c
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 31, 2026.

Transparency log

Security for bbr-buttonboard 0.1.1

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.1.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 31, 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.1 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