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.
-
Download and install PLX-DAQ
-
Open the
PLX-DAQ
folder on your desktop. -
Open the
PLX-DAQ
spreadsheet file.
This script runs on the microbit and sends the accelerometer readings over a serial connection.
{% highlight python %} from microbit import *
print("CLEARDATA")
print("LABEL,Time,Milliseconds,xaxis,yaxis,zaxis")
print("RESETTIMER");
while True: print("DATA,TIME,TIMER, %s, %s, %s" % (accelerometer.get_x(), accelerometer.get_y(), accelerometer.get_z())) sleep(100) {% endhighlight %}
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.