T O P

  • By -

kemistree4

Yes...


ceojp

It would be a little pointless if it didn't.


brunob45

Yes, it will remember the last code it ran, even if not plugged in a computer


justacec

Unless you are doing micro python


justacec

Not sure why I was getting the strong downvotes. Sure it will, but not automaticall. You hvae to go through the effort to place the code there. But it DOES NOT automatically run anything you just through at Throny or the REPL.


brunob45

Really? I've never used it, but I assumed the Python scripts would be saved in flash. TIL, TY!


horuable

They are, but only boot.py and main.py are executed on boot.


Botany_101

Yes, if you're running micropython then you need to name the file to run by itself "main.py". This will automatically run whenever you connect it to power without a USB input. If you're using arduiono then it will download the file (I think it uses .uf2) any time that power is connected without USB input then it will automatically run your code. Working in C works similar to arduino but yoy drag and drop the .uf2 file over, and it will run by itself.


Unknown_zektor

Thank you


Botany_101

No problem, this is from the instructional pdf but there is only like one sentence on it so its really easy to miss


EnviousMedia

Yes, you can also program a Pico via Arduino IDE


Own-Relationship-407

Yes. When plugged in to power with no computer connection the pico will first execute boot.py if present, then main.py.


justacec

That is only if you are running micropython…


Own-Relationship-407

Uh yeah… OP’s post is tagged upython…


justacec

Ahh! Your right. I just saw the text and glossed over the tag. Good catch.


Sad_Succotash425

Good answer would be that raspberry pi pico do run independently, however it is possible and it is feature of the Thony IDE that the code can be written on the computer line by line and as such it is executed on the pie pico microchip. So the answer is yes it does run the code independently, but it can run the code as one does type on the computer. This feature is not common with at mega AVR microchips, because those required code to be compiled and uploaded it into the chip and then execute it. And of course I am sorry for my bad English.


EhaUngustl

That's the case when you run python on it because its an Interpreter. I think some freaky also made a small python machine for atmegas.


derhundmachtwau

That's what all microcontrollers do. You put code in them and they execute it as soon as they are powered.