Converts a Sense HAT recording to CSV format, for the purposes of debugging or analysis.
sense_csv [-h] [--version] [-q] [-v] [-l FILE] [-P]
[--timestamp-format TIMESTAMP_FORMAT] [--header] input output
show this help message and exit
show this program’s version number and exit
produce less console output
produce more console output
log messages to the specified file
run under PDB (debug mode)
the format to use when outputting the record timestamp (default: ISO8601 format, which is “%Y-%m-%dT%H:%M:%S.%f”; see strftime(3) for information on valid format parameters)
if specified, output column headers at the start of the output
To convert a recording to CSV, simply run sense_csv with the recorded file as the first filename, and the output CSV file as the second:
$ sense_csv experiment.hat experiment.csv
By default, only the data is output, with the columns defined as follows:
If you wish to include column headers as the first row of data, simply specify the --header option:
$ sense_csv --header experiment.hat experiment.csv
If - is specified for either filename, sense_csv will read from stdin, or write to stdout. This can be used in conjunction with other standard command line utilities for all sorts of effects. For example, to produce a CSV file containing only the timestamps, humidity, and accelerometer readings:
$ sense_csv --header experiment.hat - | cut -d, -f1,4,6-8 > experiment.csv