Overview

When you use the data logging feature on the micro:bit V2, an HTML file called MY_DATA is created on the MICROBIT drive that lets you interact with the logged data.



Who has access to MY_DATA?

The data stays on your micro:bit and on your computer, should you choose to copy or download it. It is not uploaded to the internet or shared with anyone unless you choose to.


Viewing MY_DATA in the browser

In the following example, we use the MakeCode editor to log two columns of light level and temperature data every 2 seconds to generate our MY_DATA file.


https://makecode.microbit.org/_Xt25jyMXePd3


Double-click on the generated MY_DATA file to open it in your default browser. The page displays a set of buttons for interacting with the data and a table containing the logged data so far. You may need to disconnect and reconnect the micro:bit to view the data on the page.


Buttons menu

Download

Download the current data as a Comma-Separated Values (CSV) file that you can import into a spreadsheet. The data is in a fixed format, using a period (.) as a number separator. If you want to change this, you can do so in a spreadsheet application.


Copy

Copies the current data to your clipboard so you can paste it into another document, such as a spreadsheet.


Update data...

To update the table data, you must disconnect and reconnect the USB cable. The new rows will be added to the bottom of the table, so you may need to scroll to the bottom of the page to view them.


Clear log...

To clear the log, you need to download a new program to the micro:bit. Read more about how to clear the log and delete the log completely.


Visual Preview

The visual preview tab displays plots of your logged data and lets you interact with them. In this accelerometer example, the values are plotted on the x-axis and the time in seconds on the y-axis.



You can use the buttons at the top of the visual preview tool to interact with the data, for example, zooming in and out on sections. You can also show or hide data columns.


Working Offline

The MY_DATA.HTM page fetches additional information from the microbit.org website when it is loaded. If you are working offline, this functionality will not be loaded. Read more about the difference between online and offline data logging.