Save files to RP2040

Play with it! Please tell us which board you're using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Chadfrom308
 
Posts: 16
Joined: Wed Feb 10, 2021 1:24 pm

Save files to RP2040

Post by Chadfrom308 »

Hey all, I'm pretty new here. I used to use arduino a lot, then took a long break from them, now I'm back and there's been a lot of changes.

I got myself an adafruit RP2040 feather and a display. I'm going to use it to control a VFD with modbus.

I've never used circuit python before.

Anyways, I wanted to save some values to the microcontroller, but I see the 2040 does not have any eeprom.

I see that it has flash on board, though. How can I access that with circuit python? Basically I want to open/save a file with some settings. Does it work just like regular files in python?

Code: Select all

f = open('file.txt', 'r')
?

User avatar
Chadfrom308
 
Posts: 16
Joined: Wed Feb 10, 2021 1:24 pm

Re: Save files to RP2040

Post by Chadfrom308 »

Edit: Yes it's that simple.

I put a "settings.txt" file in the root directory of the CIRCUITPYTHON drive on my computer (the microcontroller) and it read as expected.

I was over thinking it.

Locked
Please be positive and constructive with your questions and comments.

Return to “Circuit Playground Classic, Circuit Playground Express, Circuit Playground Bluefruit”