pybricks / pybricks-projects

Example programs for Pybricks
MIT License
95 stars 42 forks source link

Project location for generic, non-project scripts #83

Open hwillemen opened 1 year ago

hwillemen commented 1 year ago

So I have 3 scripts that I need a location for. 1) a script for trains with lights. purpose: make a remote optional for trains: hub button can start/stop motor, stop script or turn off hub. dynamically re-connects to a remote when available (fill in name for a specific one) speed / brightness is loaded from flash on start and saved on change. location proposed: projects->sets->city & train->"trains with lights and optional remote"

2) a diagnostics script. purpose: dynamically scans all ports for devices and sets motors and reads sensors. can run on any hub with any motor/sensor attached. location: does not fit under sets, tutorials or remix. right now there is a pull request open for pybricks-api but I agree that it IS a large script. Might be interesting though to get a reference to it from pybricks-api: pupdevices page as well.

3) single button example (short script). purpose: a more universal version of https://docs.pybricks.com/en/latest/hubs/cityhub.html -> "Using the stop button during your program" and similar ones for other hubs. it checks the button during runtime and has different actions for short press, 2s press (exit) and 5s press (power off). location: if you are ok with it I could replace the existing example with this one.

Let me know if you agree with the locations.