I've been doing my
first bit of data logging recently on a CLUE and CIRCUITPY was an obvious, easy choice for storage. I've realised I might be at risk of wearing out the flash. I've been writing 80 bytes at a time and using flush() to ensure they persist immediately. I've probably done this (see code below) every 10 seconds for about 6000 data lines. Am I at risk of trashing my CLUE?
Code: Select all
data_file.write(out_text.encode(encoding) + end) # 80 bytes of data
data_file.flush()
Will the lifetime be extended without the
flush()? Should I buffer data inside my app and write it in certain block sizes to maximise the life of flash?