SENSE_PLAY(1)

πŸ“¦
version 1.2 Β· 2 versions
, in ubuntu jammy, ubuntu noble

πŸ’– SENSE_PLAY(1) πŸ’–

okay bestie, welcome to the sense-emu manual page for sense_play β€” it's the Sense HAT emulator playback tool and honestly? she's iconic for it. πŸŽ€


✨ NAME ✨

sense_play β€” Sense HAT emulator playback

Replays readings recorded from a Raspberry Pi Sense HAT, via the Sense HAT emulation library. no cap, that's literally the whole job. 🫢


🌸 SYNOPSIS 🌸

sense_play [-h] [--version] [-q] [-v] [-l FILE] [-P] input

that's it, that's the whole vibe check. one input, a lil handful of flags, slay. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

here's every flag she takes, no gatekeeping, fr fr:

  • -h, --help β€” show this help message and exit. your classic "wait what does this do again" button πŸ’–
  • --version β€” show this program's version number and exit. she'll tell you exactly how old she is ✨
  • -q, --quiet β€” produce less console output. for when you want her to stop yapping πŸ”‡
  • -v, --verbose β€” produce more console output. for when you want her to yap more πŸ‘‘
  • -l FILE, --log-file FILE β€” log messages to the specified file. receipts, but on disk πŸŽ€
  • -P, --pdb β€” run under PDB (debug mode). main character energy for when something's acting up πŸ›

🌈 EXAMPLES 🌈

wanna play back an experiment you recorded from the Sense HAT? bestie, you literally just hand sense_play the filename and go:

$ sense_play experiment.hat

playback starts immediately and continues in real-time β€” like, at the recording rate β€” until the file is exhausted. she does not rush, she does not dawdle. periodt. ⏱️

and if you wanna start an emulated script at the exact same time as playback, you can use the shell's job control facilities, because your shell is also a queen:

$ sense_play experiment.hat & python experiment.py

okay and this part is lowkey genius: if you specify - as the input file, sense_play will read from stdin. which means you can play back compressed recordings (peep the Examples section under sense_rec) without burning any disk space on decompression. obsessed. 😭

$ gunzip -c experiment.hat.gz | sense_play -
NOTE: if playback is going too slowly β€” like, say the Pi is too busy with other tasks, or the data can't be read quickly enough off the SD card β€” sense_play will skip records and print a warning to the console at the end of playback with the number of records skipped. she'll always tell you how many she dropped. she keeps it honest. πŸ’€

πŸŽ€ AUTHOR πŸŽ€

Raspberry Pi Foundation πŸ’œ


2016-2021 Raspberry Pi Foundation


and that's the whole page bestie! this was version 1.2, dated Sep 02, 2021, brought to you by sense-emu β€” go replay something cute, you've got this πŸ§šπŸ’–

πŸ“¦ where this page comes from