Main.py does not work? [Galactic Unicorn]

I know that I might sound stupid, but I’m new to rpi and python.
My issue is, when I put the main.py in to the raspberry it does not start, there is only the example.
I have tried to install micropython from Thonny even downloaded “pimoroni-galactic_unicorn-v1.21.0-micropython.uf2”

But once I put the main.py there and reboot , nothing … it only runs the example within the firmware.

I just flash_nuked my Galactic Unicorn and flashed it with
pimoroni-galactic_unicorn-v1.21.0-micropython.py
My main.py ran from Thonny, and on boot just fine. I had backed it up, before erasing everything on the RP2040. I wanted to test the new firmware version. Thought I’d post how it went for me.

You may have to give more detail on what steps you followed, or what guide you followed.
This might help.
Getting Started with Raspberry Pi Pico (pimoroni.com)

The scripts run just fine from Thonny, but should it not also work if you copy main.py file on to the galactic unicorn and reboot?
Or do I need to use thonny to upload the script every time I restart the galactic unicorn?

Yes, if there is a main.py stored on the Pico, it will try to run it on boot up.
Make sure its main.py, not Main.py.
Are you doing a file, save as, from Thonny?
Pico in normal mode, not Boot mode?

In normal mode, there is no way to keep the code there (as far as I know), only to launch it in Thonny.
In boot mode, I just copy the “main.py” to the drive, and reboot.
It always starts with the examples…

Ah, there’s your problem. Thats not how you save your main.py to the Pico. You only put it in Boot Mode to flash the Firmware. Everything else is done in normal mode.
In Thonny click “File”, “save as”.
You should then get a popup Box with an option to save to PC or the Pico.
Select Pico, name your file main.py, and save.

Thank you ! that was it.

1 Like