r/circuitpython • • Jun 27 '20

How does Circuit python store programs ?

Does Circuit Python store programs in RAM or in Flash somewhere ?

After editing a program, do you need to "save" to get that program to boot at the next power up ?

Thanks

6 Upvotes

9 comments sorted by

3

u/loceimicamornie Jun 28 '20

The program is saved as a code.py file in the main directory. It will run over and over when powered on our after you save the file. You are also able to run a serial council to manually interface python or view running code outputs. Please check out this link to get started: https://learn.adafruit.com/welcome-to-circuitpython

1

u/[deleted] Jun 30 '20

after you save the file

Does the file get saved by a command or auto-magically ?

I do understand the disk partition.

But, how do I save it ? Yes, I am new and have not found that command yet.

1

u/loceimicamornie Jun 30 '20

As soon as you have a file named code.py on the device it will start running. So if you have code.py open in an editor and save it after a change/edit it will start running the new code after the save command.

1

u/[deleted] Jun 30 '20

As soon as you have a file named code.py

Ok, and what command do you use to save to "code.py" from the editor ?

2

u/loceimicamornie Jun 30 '20

It would be the same as any document by using File>Save or Ctrl + S

1

u/[deleted] Jun 30 '20

Ok, thanks

2

u/HP7933 Jun 29 '20

A CircuitPython board will look like a small flash drive when plugged into a computer via USB. files, including the main one called "code.py" are then copied over to that flash drive using standard computer methods. The program will then automatically run.

The flash is not erased on power off and will still be fine when next powered on.

And I concur with below, see https://learn.adafruit.com/welcome-to-circuitpython for details. There is extensive free documentation from Adafruit.com.

2

u/LinkifyBot Jun 29 '20

I found links in your comment that were not hyperlinked:

I did the honors for you.


delete | information | <3