SD Card Data Rollover

flexy-201

#1

Hi,

In a Flexy 201 with firmware 13.2s0, I need to log data in a file located in the SD card. The oldest data in the file should be overwritten when the SD card memory is full.

In the programming manual, it is explained that in order to access a file there are three operation types, INPUT, OUTPUT, and APPEND. But apparently, none of these operation types can delete a specific data inside a file. Therefore, I would like to know if it is possible to create a script that would do a rollover function, i.e., deleting the oldest data in a file when the memory is full.

Thank you.


#3

Hi @CEUC

Are you trying to do a FIFO setup for this code or do you want to export all of the data when it’s full and then start a new file afterward?


#4

Hi Tim,

I am trying to do a first in first out, I want to keep a backup file in the SD Card with the last three months of data. Therefore, the file would always have the last three months of data.

Thank you.


#5

Hello,

I think the post below should be helpful


#6

Hi Tim,

I want to be able to delete a specific data inside a file, the oldest one, and keep appending the new one. In the recommended post, it is not explained how to delete the oldest data that is at the beginning of the file. Is it possible to delete data at the beginning of the file?

Thank you.


#7

Hello,

I’m going to grab an SD card and try setting this up on one of my devices to test this out and get it working. I’ll try and get back to you soon on it