How to let the Raspberry Pi run the program out of the compiler?

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
Post Reply
Jackli
Posts: 80
Joined: Thu Apr 29, 2021 9:11 am

How to let the Raspberry Pi run the program out of the compiler?

Post by Jackli » Tue Aug 17, 2021 8:08 am

How to save the written code inside the Raspberry Pi and let the Raspberry Pi run the program without a compiler?

fdufnews
Posts: 76
Joined: Mon Jul 25, 2016 11:31 am

Re: How to let the Raspberry Pi run the program out of the compiler?

Post by fdufnews » Wed Aug 18, 2021 10:55 am

Your question is a bit unclear.
I suppose you are talking about a Raspberry Pi Pico.
Do you mean you have manually entered your code in the REPL using some kind of terminal software and want to save it?

The REPL is more a way test short pieces of code it is not meant at developping applications. As I know, there is no way to save into the filesystem a code manually entered.
Usually, applications are entered in a text editor and downloaded into the Pico with some software tool.
You can use Thonny to do this quite simply.

By the way, there is no compiler, Python is interpreted.

Jackli
Posts: 80
Joined: Thu Apr 29, 2021 9:11 am

Re: How to let the Raspberry Pi run the program out of the compiler?

Post by Jackli » Tue Aug 24, 2021 8:52 am

I do use pico.
I meant just saving the program code.
I found a solution, in the THONNY compiler select and connect the Raspberry Pi pico, and then when you open the file you can choose to open the computer local files or Raspberry Pi internal files, and then at this time to write the program file renamed main.py and save to the Raspberry Pi internal, if the program contains third-party library files also to be saved together (library files do not need to change the name), and then If the program does not run successfully, there are some problems which cannot be detected in the compiler, so if the procedure of saving is correct and the program is not running, you need to check the code again.

Post Reply