MicroPython on PicoSystem

I’ve copied the .uf2 file to the PicoSystem and I can run the demos but I can’t work out how to get my python program onto the PicoSystem. An online tutorial for a different RP2040 pico board said to call the script main.py so I tried copying a main.py file to the PicoSystem but it didn’t do anything.

Do I have to build a new .uf2 file with my script included? Is there some other way that I’m just not seeing? How does this thing work?

No you should not have to build a new uf2 file at all.

What program are you using to write your code? If thorny if you have the pico connected then when you press save it should ask you if you want to save it on the pico or the computer if you want the code to run on the pico when powered away from the PC on a battery then save it as main.py to the pico.

This link shows the save dialog that should pop up:

https://projects.raspberrypi.org/en/projects/getting-started-with-the-pico/5

DO NOT drag the file over when the pico is connect as a hdd after pressing the bootsel button this will not work.

I was creating the file in vi and dragging it over.

I have now tried using thorny but I don’t get the dialog to let me run the code on the PicoSystem. I’ve tried holding down A on switch on and not holding it down but neither work.

Since then I’ve tried CircuitPython and this does work. I can cd into the directory, create a file using vi and it runs. MicroPython doesn’t mount the PicoSystem as a directory whether I hold down A or not, should it?

I don’t need to get this working since I can use CircuitPython but it would be nice to have this as an option as well.

I would start from scratch and follow the instructions here these worked perfect for me.

https://projects.raspberrypi.org/en/projects/getting-started-with-the-pico

Remember if you are using it with any pimoroni based pack then you will need the pimoroni specific uf2 file found on their github.

You should only have to push the bootsel button when flashing a new uf2 file to the Pico.

I’ve tried using a fresh install of the OS on my Pi 4 in case there is some conflict with something I had installed. Using the relevant parts of the link you gave me I got it work from the shell but not from the editor.

BTW are you using the device described in that link? I’m using the little handheld game device they are calling the PicoSystem. Maybe this works differently, the getting started page for MicroPython on this device is a lot shorter and less detailed.

I did miss that in you are using a picosystem in the original post and I assumed you were using a standard raspberry pi pico so apologies for that.

However looking at the details on the product website it should behave like a standard Pico I believe when trying to put you own code onto it, so I don’t believe the details I have provided are incorrect.

If it is still not working perhaps email pimoroni support for some advice.

Sorry I don’t think I can help further.