Skip to content

Latest commit

 

History

History
78 lines (50 loc) · 2.24 KB

graphing-data-from-the-microbit.md

File metadata and controls

78 lines (50 loc) · 2.24 KB
title layout meta-description share author about cats simple-description date date-updated
Graphing Data from Microbit into Excel
text-width-sidebar
How to chart data from a microbit into Microsoft Excel.
true
jez
Using Excel, and PLX-DAQ to live steam data from a microbit.
data logging
Live Data & Excel
2016-12-23 10:20:00 UTC
2016-12-23 10:20:00 UTC

It is possible to chart data from the microbit in Excel in real time. However, it's important to note Excel was never designed for this and has some limitation.

Parallax Data Acquisition Tool (PLX-DAQ) is used to acquire the data which is then charted in Excel.

In this example, the value of the x, y & z axis of the accelerometer is plotted in a chart.

1. Install Windows Software

  1. Download and install PLX-DAQ

  2. Open the PLX-DAQ folder on your desktop.

  3. Open the PLX-DAQ spreadsheet file.

2. Flash Microbit Code

This script runs on the microbit and sends the accelerometer readings over a serial connection.

{% highlight python %} from microbit import *

Tell excel to clear previous data

print("CLEARDATA")

Tell excel the column header names

print("LABEL,Time,Milliseconds,xaxis,yaxis,zaxis")

Reset the timer added by Excel

print("RESETTIMER");

while True: print("DATA,TIME,TIMER, %s, %s, %s" % (accelerometer.get_x(), accelerometer.get_y(), accelerometer.get_z())) sleep(100) {% endhighlight %}

3. Connect & Collect Data

{:.ui .image} Connect to Data Source

Select ports and baud speed (115200; not 9600) and click 'Connect'.

Press the 'reset' button on the back of the microbit. Data from the microbit will stream into the spreadsheet. Charts can be drawn which are updated in real-time.