0

Save files to RP2040
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Save files to RP2040

by Chadfrom308 on Mon Jun 21, 2021 4:57 pm

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 | TOGGLE FULL SIZE
f = open('file.txt', 'r')

?

Chadfrom308
 
Posts: 3
Joined: Wed Feb 10, 2021 1:24 pm

Re: Save files to RP2040

by Chadfrom308 on Mon Jun 21, 2021 5:20 pm

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.

Chadfrom308
 
Posts: 3
Joined: Wed Feb 10, 2021 1:24 pm

Please be positive and constructive with your questions and comments.