pimoroni-pico icon indicating copy to clipboard operation
pimoroni-pico copied to clipboard

Badger 2040 - use custom launcher.py if present

Open helgibbons opened this issue 2 years ago • 2 comments

Would be nice if main.py could check for a custom launcher.py before resorting to the built-in one. It currently uses the built-in version even if there a customised launcher.py on the Badger, causing confusing behaviour like this.

helgibbons avatar Mar 21 '22 15:03 helgibbons

just change the line in main.py from import _launcher

to

import launcher.py (or whatever file you want).

just tested and that works for me

thefunkygibbon avatar Mar 24 '22 09:03 thefunkygibbon

Or just totally overwrite main.py with a completely different script. I modified launcher.py and loaded it as a completely different main.py directly containing all the launcher.py code. This is totally normal micropython behaviour, it just runs main.py (if present) automatically at boot. I agree that import _launcher is confusing and means that there is perhaps far too much 'not very useful' example code baked permenantly into the pre-built pimoroni pico micropython images.

veryalien avatar Apr 02 '22 09:04 veryalien

Badger 2040 and Badger 2040 W now live here: https://github.com/pimoroni/badger2040/

Both boards now have a user-visible "launcher.py" and none of the jankyness from the original Badger 2040 so I think this is effectively solved.

Gadgetoid avatar Mar 09 '23 20:03 Gadgetoid