STEM in N logo

bit:plot — user guide

micro:bit & friends · from the browser, no server · data stays local
Contents
  1. What is this, and what is it for?
  2. What do you need?
  3. Preparing the device (micro:bit)
  4. First live measurement, step by step
  5. The interface at a glance
  6. Chart types
  7. Time window, zoom, 3D rotation
  8. Customising data series (name, colour, visibility)
  9. Loading earlier data and comparing
  10. Table view
  11. Prediction (curve fitting)
  12. Saving (CSV, PNG)
  13. Troubleshooting

1. What is this, and what is it for?

bit:plot is a measurement system that runs in the browser for classroom experiments: it plots the sensor data of a device connected over USB (micro:bit, Arduino, Raspberry Pi Pico…) live, with thirteen chart types, and can also reload and compare earlier measurements. No installation and no server are needed: all data stays on your computer, nothing is uploaded to the internet.

The interface is available in three languages (Hungarian, English, German) — switch it with the drop-down at the top right.

2. What do you need?

On first open, downloading the Python engine may take up to half a minute (~15–20 MB) — after that it starts instantly from the browser cache.

3. Preparing the device (micro:bit)

The device must write its data to the serial port at 115200 baud. The program understands two formats:

MakeCode example (built from blocks)

A single named value (name:value) — e.g. temperature with the “serial write value” block:

MakeCode: forever — serial write value “temp” = temperature (°C), pause 100 ms
One channel: temperature sent under the name “temp” (temp:23.5).

Several raw numbers at once (e.g. the X-Y-Z axes of the accelerometer) — with the “serial write numbers” block, as an array:

MakeCode: forever — serial write numbers, array of acceleration x/y/z (mg), pause 100 ms
Three raw numbers: the program takes them as “value 1/2/3”.

MicroPython example

from microbit import *

while True:
    print("temperature:{}".format(temperature()))
    sleep(200)
Moving the device? (e.g. acceleration) — the USB cable easily loses contact when moved. In that case build a radio bridge: the moving micro:bit runs on a battery and sends the data over radio, while a second micro:bit forwards it to the computer over USB in the same name:value format.

4. First live measurement, step by step

  1. Connect the device to the computer with a USB cable.
  2. Click the Connect button (top right) and pick the device from the pop-up list (e.g. “mbed Serial Port” or “USB Serial Device”).
  3. Click Start measurement — the data is drawn live.
  4. When finished: Stop measurement. The data stays in the view, ready to be saved or analysed.
After connecting, the measurement does not start on its own — you can even load earlier data as a backdrop first, and the live measurement is drawn on top of it (e.g. “last week’s measurement vs. now”).

5. The interface at a glance

Header (top row)

ElementWhat it does
Connect / Disconnect Opens/closes the serial connection.
Start / Stop measurement Controls recording (appears after connecting).
Data… Loading earlier measurements (from file or clipboard) and deleting them.
Table The measured numbers in a movable table window.
Save CSV / Save PNG Downloads the data or the chart image. Active only when there is data.
Language selector Magyar / English / Deutsch — switches everything instantly.
▲ Controls and Collapse the control bar (giving the chart more room), or full screen — useful for projecting and on tablets.

Control bar

6. Chart types

TypeWhat it is for
LineChange of a continuous quantity over time — the default view.
Point + lineThe same, with the measured points marked — instructive with few samples (you can see that a measurement is a series of discrete samples).
AreaThe area under the line filled in — conveys accumulation.
StepData that changes in jumps, state-like (a counter, a switch).
BarValues as bars along the timeline.
Scatter (X–Y)The relationship of two channels (not by time) — looking for correlations. X and Y from the bar’s selectors.
3D motionThe trajectory of three channels (e.g. the accelerometer’s X-Y-Z axes) in space — rotatable with the mouse, zoomable with the wheel.
HistogramThe distribution of the values — what is common, what is rare.
Box plotStatistical summary: min, quartiles, median, max, mean — with exact numbers.
PieThe proportion of the channels in slices. With the Statistic switch you can choose whether it shows the proportion of the last values, the sums, the averages or the sample counts — for event counting (e.g. traffic counting: the device sends 1 per event as a:1 / b:1) “Sum” gives the real comparison of the amounts.
Big numberOne channel’s value as a huge number — instrument mode, for projecting. With the Statistic switch it can also show sum/average/count (e.g. “47 cars so far”).
Meter barsValue(s) as “thermometers”, with a manually adjustable scale — one bar per sensor. Here too the Statistic switch offers last / sum / average / count (for event counting the bars show the amounts).
RadarThe “profile” of several channels on one set of axes arranged in a circle (one spoke per channel). The Statistic switch sets what each spoke shows — last / sum / average / count — and the shared radial scale can be fixed with the Scale fields. It is most useful for comparing several loaded datasets (with “All” selected in the “Data” picker): each source is drawn as its own polygon over the same web, so a single glance shows how the measurements differ. The spokes are the union of the sources’ channels; where a source has no data for a channel, its polygon is pulled to the centre.
Sonar mode: the Sonar switch replaces the profile with a live polar distance–angle display (like a rotating radar/sonar). Pick the two channels with the Dist and Angle selectors; the latest (distance, angle) point sweeps around, 0° (up) is the first measured angle, and rotation is clockwise. The range can be fixed with the upper Scale field (e.g. 400), otherwise it is automatic. Typical device: an ultrasonic distance sensor on a rotating servo sending distance,angle pairs.

7. Time window, zoom, 3D rotation

8. Customising data series

Click a data series’ name in the legend (below the chart) — a pop-up lets you set:

In Two axes mode the “Left / right axis…” button opens a panel where you can assign which channel goes to which side — for data of different magnitudes (e.g. temperature and light level together).

9. Loading earlier data and comparing

  1. Open the Data… panel.
  2. Load the measurement From file… (several files can be selected) or From clipboard… (e.g. CSV copied from the micro:bit data log).

10. Table view

The Table button shows the raw numbers (time + channels) in a movable, resizable window. Clicking a row highlights the matching point on the chart with a time marker. The number of rows can be limited (20 / 100 / 500 / All).

11. Prediction (curve fitting)

In a time-series view, the program fits a model to a chosen channel and forecasts up to twice the measurement’s span — “what do we expect next?”. Three models are available:

The fitted equation and R² (goodness of fit) appear below the chart. On the first activation, downloading the numerical packages (numpy/scipy) may take a minute or two — the measurement keeps running undisturbed meanwhile.

There is no fitting in the comparison (“All”) view — first focus a dataset from the “Data” drop-down.

Together with the Cumulative switch, the prediction fits the running-total curve — this is the classic forecasting combination: event counting + linear gives the rate and the expected final total at a given time; the saturating case count (cumulative) + logistic estimates the plateau (total number of cases), as with epidemic curves.

12. Saving (CSV, PNG)

13. Troubleshooting

SymptomSolution
The device does not appear at Connect. Check the cable (there are “charge-only” cables that carry no data!). Try another USB port. On the micro:bit, update the firmware if it is very old.
“Could not open the port — maybe another program is using it.” Close the serial console of the MakeCode/Mu editor or the other browser tab that is connected to the device, then try again.
“The device was lost — the USB connection dropped.” Contact fault: moving broke the USB link. Check the connector; for moving measurements use a radio bridge (chapter 3).
Data arrives but nothing is drawn. Check the format: it must be name:value or a raw number per line, at 115200 baud. The Table view shows what the program recognised.
No button for live measurement / “Web Serial: not supported”. Live measurement needs Chrome or Edge. Loading and analysing still works in other browsers.
The interface behaves oddly after an update. Force reload: Ctrl+F5 (the browser may keep the old version in its cache).