microsoft / microsoft/pxt-microbit

datalogger simulator erases most data when the log is full

Open
#6,448 2 comments 1 reaction 2 assignees View on GitHub

@abchatra is already working on this.

Since Sep 14, 2026.

  • #11606 by @copilot-swe-agent — open
data logger help wanted P2 Simulator
Dominant language
TypeScript
Stars
804
Forks
721
Avg merge
2d 9h
Merged PRs (30d)
2

Description

Describe the bug
A simple programme logging data rapidly will fill the datalog storage fairly quickly.
Running the programme in the the simulator, when the "data full" event is raised, it seems to erase all previous data except the last row.

Downloading the CSV file also downloads only the last log, so all the previous simulated data is lost.

To Reproduce
Load this programme, go into the datalog simulator and wait until the programme is full, should a bit less than 5 minutes, can be left in the background.

datalogger.onLogFull(function () {
    basic.showIcon(IconNames.Skull)
})
datalogger.mirrorToSerial(true)
basic.showIcon(IconNames.Happy)
basic.forever(function () {
    datalogger.log(
    datalogger.createCV("y", input.acceleration(Dimension.Y)),
    datalogger.createCV("x", input.acceleration(Dimension.X))
    )
})

This shows the programme working as expected:

Image

And the "datalog full" event has been configured to also show a skull on the display:

Image

At this point only the last row is available.

Expected behavior
Historial datalog data to be available

micro:bit version (please complete the following information):
N/A

Desktop (please complete the following information):

Chrome 138 on macOS

Additional context

Tested on MakeCode Live and Beta:

makecode.microbit.org version: 7.1.56
Microsoft MakeCode version: 11.4.43
microbit runtime version: v2.2.0-rc6
codal-microbit-v2 runtime version: v0.3.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.