Closed tadtruex closed 1 year ago
A little googling...
Should look at
littfs and pico-littlefs
LittleFS looks very well thought out and documented. pico-littlefs maybe less so, but could be a decent starting point.
Better yet... Let's not complicate things too much. This doesn't have to be a general solution. Just save room at the end of flash for 4 * NUM_SAMPLES bytes. Or (maybe) N times that. Read it into SAMPLE_BUFFER at the start. That way, if any student turns things off before grabbing their data, it will still be there next time.
It's probably going to be important to have the data in permanent storage on the flash chip. Students will surely mess things up...