PhilTilson
PhilTilson

Reputation: 65

Is it possible to upload a Python program onto a Pico via the USB port?

I have a Raspberry Pi Pico running a Python script, but the end-user will not have Thonny, nor access to the button on the Raspberry Pi Pico. I want to update the script via the USB port from a PC. Is that possible?

Using the C SDK is inappropriate in this case.

Upvotes: 0

Views: 856

Answers (1)

David Grayson
David Grayson

Reputation: 87486

In general, you're supposed to use the MicroPython remote control: mpremote to update files on a MicroPython device.

However, if you are expecting end users to do this, and they aren't very technical, you might want to create a firmware image as a UF2 file that contains both the Python interpreter and your code (either as filesystem or as frozen MicroPython modules). Then have the user install that file using the RP2040's built-in USB bootloader, which requires no additional software installation. Also, doing it this way ensures they are using the right version of MicroPython, which you've already tested with that code.

Upvotes: 0

Related Questions