Logging Into a Spreadsheet

There are several ways to record data into a spreadsheet. The following examples will have Circuit Playground Express poll its sensors and then output the data over USB in such a way that it will "type" the numbers into a on-screen computers spreadsheet.

This method uses the USB feature known as human interface device protocol (HID). Plug in a keyboard or mouse into modern computers via USB, and they "just work". Computers can have multiple keyboards, it doesn't confuse them. So we'll use this property to have the Circuit Playground Express output data like a keyboard would, "typing" characters out.

For spreadsheets, to go "to the next line" the keystrokes are typically the down arrow followed by the left arrow to get back to column 1. We'll emulate those keystrokes also to align the data into nice, neat columns.

The first examples shows logging data via CircuitPython. The second example demonstrates the same concept in Microsoft MakeCode.

This guide was first published on Aug 14, 2018. It was last updated on Aug 14, 2018. This page (Logging Into a Spreadsheet) was last updated on Apr 18, 2019.