The data logging feature is designed to store the data on the micro:bit device until you take an action to delete it. You can do this by flashing a new program to the micro:bit or by coding it to delete the log as part of your program.
Fast
A 'fast' erase process marks the MY_DATA log file as empty, so the data will not show on the page when it is loaded in the browser. It is the quickest way to delete the log and designed so that you can start collecting new data. A 'fast' delete is what happens when you flash a new program to the micro:bit via USB.
However, whilst the log appears empty, the log data has just been invalidated, meaning that the micro:bit and the MY_DATA page ignore it. It is still stored within the file.
Full
A 'full' delete will remove all the data from the MY_DATA log file. This will take longer but is more secure as it makes sure the data log will not persist on the MICROBIT device. If you are sharing micro:bits with multiple people, you may want to use a 'full' delete after you complete a data logging activity or lesson. A 'full' delete can only be performed as part of your program.
A .hex file that performs a 'full' delete and then shows a tick/check mark on the display is attached to this article.
Deleting the data log by flashing a new program to the micro:bit
Deleting the data log within your program
MakeCode
The delete log block in MakeCode lets you choose between a 'fast' and 'full' erase.
- A 'fast' delete will invalidate the data and mark the MY_DATA log file as empty. It is the quickest way to delete the log, but whilst the log appears empty, the log data remains on the device.
- A 'full' erase will remove all the data from the MY_DATA file. This will take longer but is more secure as it makes sure data will not persist on the MICROBIT device.