Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Document new hub_menu feature #144

Closed
laurensvalk opened this issue Jun 29, 2023 · 0 comments
Closed

Document new hub_menu feature #144

laurensvalk opened this issue Jun 29, 2023 · 0 comments

Comments

@laurensvalk
Copy link
Member

laurensvalk commented Jun 29, 2023

We should also add a tutorial (perhaps a video) to explain how it can be used to "store multiple programs on the hub".

Basically, it works like this:

from pybricks.tools import hub_menu

# Choose a letter.
selected = hub_menu("F", "D", "Z")

# Based on the selection, run a program.
if selected == "F":
    import fly_mission
elif selected == "D":
    import drive_mission
elif selected == "Z":
    import zigzag
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant