SENSE_CSV(1)
π sense_csv β the Sense HAT CSV glow-up tool π
okay bestie, so this is sense_csv(1) from the sense-emu manual, and it's literally the tool that turns your Sense HAT recording into a CSV file. Why? For debugging or analysis, obviously. It's giving "let me actually look at my data" energy and we're obsessed. π
β¨ NAME β¨
sense_csv β the Sense HAT CSV conversion tool.
Converts a Sense HAT recording to CSV format, for the purposes of debugging or analysis. no cap, that's the whole job and she does it beautifully π
πΈ SYNOPSIS πΈ
sense_csv [-h] [--version] [-q] [-v] [-l FILE] [-P]
[--timestamp-format TIMESTAMP_FORMAT] [--header] input output
π¦ DESCRIPTION π¦
Here's the full rundown of every flag, bestie β don't skip a single one, they all matter:
-h,--helpβ shows this help message and dips out. iconic.--versionβ shows this program's version number and then exits. hello, who are you?-q,--quietβ produce less console output. shhh π€«-v,--verboseβ produce more console output. tell me EVERYTHING π£οΈ-l FILE,--log-file FILEβ log messages go to the file you specify. your receipts, saved.-P,--pdbβ run under PDB, aka debug mode. main character debugging arc π₯--timestamp-format FMTβ the format to use when outputting the record timestamp. default is ISO8601 format, which is"%Y-%m-%dT%H:%M:%S.%f". seestrftime(3)for info on valid format parameters. yes,FMTis the placeholder β swap in your own vibe.--headerβ if specified, output column headers at the start of the output. name your columns, slay.
π EXAMPLES π
β¨ the basic conversion β¨
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:
- Timestamp β the moment in time at which the readings were taken (note that as the Pi lacks a real-time clock, this is likely to be inaccurate unless the clock has been set with NTP). lowkey a little chaotic of the Pi ngl π
- Pressure β the reading from the pressure sensor in hectopascals (
hPa). - Temperature β the temperature reading from the pressure sensor in degrees celsius (
Β°C). - Humidity β the reading from the humidity sensor in % humidity.
- Temperature β the temperature reading from the humidity sensor in degrees celsius (
Β°C). - Accelerometer X-axis β the acceleration reading along the X-axis of the HAT in
g. - Accelerometer Y-axis.
- Accelerometer Z-axis.
- Gyroscope X-axis β the angular rate of change around the X-axis of the HAT in degrees per second.
- Gyroscope Y-axis.
- Gyroscope Z-axis.
- Compass X-axis β the magnetometer reading along the X-axis in micro-teslas.
- Compass Y-axis.
- Compass Z-axis.
- Orientation X-axis β the computed orientation of the HAT as radians rotation (
-Οto+Ο) about the X-axis. - Orientation Y-axis.
- Orientation Z-axis.
π headers, because we love labels π
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
π piping, the crossover episode π
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
fr fr, that - trick is the moment. chef's kiss π«Ά
π AUTHOR π
Raspberry Pi Foundation
β COPYRIGHT β
2016-2021 Raspberry Pi Foundation
and that's the whole page, bestie π this was sense_csv(1), version 1.2, dated Sep 02, 2021 β go forth and convert, you absolute icon π
π¦ where this page comes from
- ubuntu jammy: sense-emu-tools 1.2-0ubuntu1 Β· LGPL-2.1-or-later
- ubuntu noble: sense-emu-tools 1.2-0ubuntu1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms