[Doc] Add menu example to tutorials section #861
Labels
documentation
Improvements or additions to documentation
pybricks.com
support
Request for technical support for a problem that is not a bug or feature request
This would make a good example on the tutorials page:
Originally posted by @mrinalraghupathi in https://gitter.im/pybricks/community?at=639c0b6b0c89e71a337faa88
Good question! Yes, though for now you can do it with your own menu program. It's slightly more work, but on the bright side, you can make the menu do exactly what you want.
Let's say I am making an FLL program with three missions. Let's say these are my programs:
mission_drive.py
:mission_line.py
mission_fly.py
You can try all of these first as independent programs if you want.
Then, you can make a menu like this:
menu.py
As you can see, the menu allows you to pick a letter with the button. Then, based on the letter, you
import
the desired program in order to run it.I used letters here, but you can could use numbers (0--99), images, sounds, or whatever you like.
Make sure you run
menu.py
as the last program. This will re-upload the menu along with each of the missions.Originally posted by @laurensvalk in https://gitter.im/pybricks/community?at=639c26193daaa326ba88a9dc
The text was updated successfully, but these errors were encountered: