Skip to main content

pybricks menu

Main menu for pybricks

Copyright (C) 2025 Joey Parrish

The pybricks firmware doesn't come with a menu or support for multiple programs like the default Spike firmware. This is a simple menu system and basic startup checks to make it easier for kids to get started coding missions.

The startup checks ensure they don't start runs while plugged in, and show battery status while charging. If the battery level is too low on startup, a warning animation will be shown. Please charge to avoid inaccuracies caused by low torque.

Sample usage

from pybricks.hubs import PrimeHub
from pybricks.parameters import Direction, Port
from pybricks.pupdevices import Motor
from pybricks.robotics import DriveBase

from pybricksmenu import main_menu, startup_checks


hub = PrimeHub()
left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE)
right_motor = Motor(Port.B, Direction.CLOCKWISE)
wheel_diameter = 175
wheel_separation = 200
drive = DriveBase(left_motor, right_motor, wheel_diameter, wheel_separation)
run = 1


def run1(drive: DriveBase) -> None:
    drive.straight(1000)


def run2(drive: DriveBase) -> None:
    drive.turn(720)


startup_checks(hub)

while True:
    run = main_menu(hub, num_items=9, item=run)
    if run == 1:
        run1(drive)
    elif run == 2:
        run2(drive)

Metadata

Release files for pybricksmenu 0.0.6

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

Source distribution (sdist)

Source distribution for pybricksmenu 0.0.6
File Size Uploaded Provenance
pybricksmenu-0.0.6.tar.gz 4.3 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pybricksmenu 0.0.6
File Interpreter ABI Platform
pybricksmenu-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 4.3 MB

Release files / pybricksmenu-0.0.6.tar.gz

Download URL pybricksmenu-0.0.6.tar.gz
Size 4.3 MB
Tags Source
SHA-256 checksum
How to use checksums
ea6f0800f8c3f1467babdced0aa90dd459dd3854bdab92d45cf9f2c7ee6c825c
BLAKE2b-256 checksum
How to use checksums
7af7834727e1851e9fbe0f20c4469e231ff85dbaaa5c6108cd3d79c911dcceeb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / pybricksmenu-0.0.6-py3-none-any.whl

Download URL pybricksmenu-0.0.6-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f40903cd400b6581b1c1783910b3078ab74423cd7b46621240272eb92486e8a8
BLAKE2b-256 checksum
How to use checksums
019927ceb79e7794eaf3df03a24352d7703fc9a02dcade10725bd7c31559ac58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for pybricksmenu 0.0.6

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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