Previous Post

Data logging with Pybricks

Next Post
Data logging with Pybricks
DESCRIPTION

Did you know you can do experiments and data analysis with Pybricks? A teacher recently asked us about it, so we thought we'd share it here as well.

You can see how it works in the example above. By configuring the print block to print multiple values, you get columns of data in the output window. You can copy the data to your favorite spreadsheet editor for visualization and further analysis.

In this experiment, we used the time as the first column, which becomes the x-axis for both of the other values on the y-axis (angle and reflection).

Since you can print any value, you are not limited to logging sensor values. You could also log the results of your own calculations to verify that they give the expected output.

Tip: If you clear the output before you run your program, you can right-click and choose select all to conveniently copy everything to your spreadsheet editor.

Pybricks PATREON 3 favs
VIEWS1
FILES1 file
POSTEDSep 4, 2024
ARCHIVEDJun 10, 2026