Following on from the program to log data on the micro:bit here, I have been exploring how to read that data from a laptop. Initially, I looked to see if I could access files on the micro:bit, through Windows Explorer. The micro:bit shows as a USB device, but clicking on it shows no files. This… Continue reading Reading micro:bit files from a laptop
Tag: Coding
micro:bit basic data logging 3
This program runs on a laptop and reads the files that have been stored on the micro:bit’s file system using the MicroFs system described in the previous blog post. This is the third in a series of programs about using the micro:bit’s file system.Program 1: Basic writing, and reading of text to a fileProgram 2:… Continue reading micro:bit basic data logging 3
micro:bit basic data logging 2
Second program to write text to a file and read the contents of the file, It has been written as I could not find an easy example of writing and reading to a file with the micro:bit. This is an extension to the first program about logging data. This program stores real time data (the… Continue reading micro:bit basic data logging 2
micro:bit basic data logging 1
This is a first program to write text to a file and read the contents of the file again There are three parts to writing data to file:– opening the file– writing data– closing the file afterwards Line 3: opening the file The ‘open’ commands says open a file with name “storm.txt”; the w indicates… Continue reading micro:bit basic data logging 1
Part 4 – Displaying the Acceleration
When we ran the program last time, it was hard to see the numbers changing, as the numbers are only updated every half second. This is because the program has the line: sleep(500) The number passed to the function ‘sleep’ is in milliseconds (which can be written as ms), where 1000ms = one second. If… Continue reading Part 4 – Displaying the Acceleration
Week 2 – Meet the Accelerometers
This Microbit page introduces the accelerometers quite well:and provides a first program: The accelerometers measure how fast the microbit device is accelerating. Acceleration is the rate of increase of speed, and is often mentioned when people speak about cars, for example when someone says “…it accelerates well from traffic lights …” they are talking about… Continue reading Week 2 – Meet the Accelerometers
Week 1 – Hello World
The aim was to use the accelerometers of the microbit to calculate how far the device had moved Starting from basics, the first step was to get the microbit device out of the box and run a basic program on it. This seems obvious and a small step, but it moves the project from being… Continue reading Week 1 – Hello World