Datalogger

The Datalogger extension logs user data to the flash storage on the Calliope mini. Each data item is stored in a column of as part of a row of data. Data is logged to storage by rows. The columns can have names to specify the meaning of data item values.

Works with Calliope mini 3

works with Calliope mini 3 only image

Using these blocks requires the Calliope mini 3 hardware. If you use any blocks that attempt access flash memory on a Calliope mini 1 or 2 board, you will see the 927 error code on the screen.

Data logs

A data log will represent a table of information like:

Temperature Acceleration Light level
20 3 123
23 2 210
19 4 98


A data item consists of value name, which is it’s assigned column too, and the item’s value. They are called “column-value” items. Here’s how a column-value item is created.

let item = datalogger.createCV("temperature", input.temperature())

The order and the names of the data items are set using column titles.

datalogger.setColumnTitles("temperature", "acceleration", "light")

Data items are logged to storage as a row. Here’s an example of logging a row of data. Each different data value is associated with its colunm before it’s logged.

let temp = datalogger.createCV("temperature", input.temperature())
let accel = datalogger.createCV("acceleration", input.acceleration(Dimension.X))
let lite = datalogger.createCV("light", input.lightLevel())
datalogger.log(temp, accel, lite)

Blocks in this extension

datalogger.createCV("", 0)
datalogger.setColumnTitles([""])
datalogger.log(datalogger.createCV("", null))
datalogger.deleteLog(DeleteType.Fast)
datalogger.includeTimestamp(FlashLogTimeStampFormat.None)
datalogger.onLogFull(function() {})
datalogger.mirrorToSerial(false)

See also

create cv, set column titles, log, delete log, include timestamp, on log full, mirror to serial

datalogger