Skip to main content

13 May 2022

Datalogging with micro:bit V2 - part 3

Stuart Ball profile image
Written by

Stuart Ball | Chief Content Editor - Computing at School

The previous post  explored how to write the code to turn the V2 into a remote data logging device, that records and stores data.

This post looks at how to access and visulise the logged data.

This command instructs the microbit to record a reading from the sound sensor and stores a value in an array every one second.

That data is saved directly to the microbit in a file called MY_DATA.HTM.

To access this file Open your File Manger on your computer, find the microbit and double click on it , open like you would a flash drive. You will see the MY_DATA.HTM listed.

Double click on this and it will open in your browser. You should see something like this.

NOTE: If you are not seeing this , then check that you have created and downloaded the code to the microbit using the BETA version of the editor. 

This page allows you to download all the data as a CSV file . This is very useful as the data can be accessed later and used in the spreadsheet of your choice. Copy allows the data to be copied and pasted into a spreadsheet, really useful if you are collecting daily data and are adding it to a culumunitive data collection.

This data is not a live stream, so Update Data, adds the data that has been captured whilst looking at the file.

Clear log, does exactly that, and prepares it for the next collection.

Visual Preview, is where the magic happens, clicking this will produce an interactive visualisation of your data.

Clicking on a data point will give you information about that point. So pupils will be able to identify the highest an the lowest values.

Clicking on the camera in the top right allows pupils and teachers to capture the plote graph that can be printed out or inserted in a document as a recrord of activity.

Now you are able to record and log sensor data on a microbit, try experimenting with recording more that one sensor reading , buy adding another column to the array command.




Please login to post a comment