SENSE_EMU_GUI(1)

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

πŸ’– SENSE_EMU_GUI πŸ’–

okay bestie so this is sense_emu_gui, and it lives in the sense-emu manual, and it is literally the Sense HAT emulator ✨

It's the Sense HAT emulator application β€” a GTK app that gives you an interactive lil interface for emulating the Raspberry Pi Sense HAT. no cap, it's adorable.


✨ SYNOPSIS ✨

sense_emu_gui

πŸŽ€ USAGE πŸŽ€

[image]

okay so the main window? divided into four parts, and each one is serving a look πŸ’…

At the left is a visual representation of the Sense HAT. Scripts that use the emulator library (sense_emu) to set the HAT's LEDs will show their result right here. Immediately below the LEDs are the rotation buttons, which rotate the view of the HAT. Heads up: these buttons also affect the action of the joystick buttons (we're getting to those, don't worry 🫢).

To the right of the LEDs are three sliders representing the temperature, pressure, and humidity of the emulated HAT's environment.

NOTE: The emulation does not precisely reflect the settings of the temperature, pressure, and humidity sliders. Random errors are introduced that scale according to the sensor specifications, and as the sliders are adjusted, the sensor value will gradually drift towards the new setting at a similar rate to the sensors on the real HAT. it's giving "realistic but make it messy" 😭

On the far right of the window, three sliders give you the orientation of the emulated HAT in terms of yaw (rotation around the vertical Z axis), pitch (rotation around the Y axis), and roll (rotation around the X axis). Adjusting these sliders affects the accelerometer, gyroscope, and magnetometer (compass) sensors on the emulated HAT. The emulated HAT assumes gravity runs vertically in the direction of the Z axis (as in the real HAT), and that North is in the direction of the X axis. physics queen πŸ‘‘

Finally, at the bottom right of the window, there's a whole series of buttons to emulate the joystick on the HAT. The buttons simulate press, release, and hold events generated by the real joystick. And here's the iconic part: when the view of the HAT is rotated, the joystick buttons act in the new orientation of the HAT. For example, initially the "up" button sends "up" events. After the HAT is rotated 90Β° the "up" button sends "right" events. After another 90Β° rotation, the "up" button sends "down" events, and so on. it just keeps going πŸ”₯

NOTE: The emulator must be run prior to starting any scripts which expect to use the sense_emu library. However, the emulator can be terminated (and restarted) while scripts using the library are running (obviously, when the emulator isn't running sensor errors can't be emulated and all sensor readings will appear fixed). Attempting to spawn more than one instance of the emulator will simply activate the existing instance. one emulator at a time, bestie, it's not polyamorous πŸ’€

🌸 PREFERENCES 🌸

On slower Pis in particular, you may wish to disable some aspects of the emulation for performance purposes. From the "Edit" menu, select "Preferences". In the window that appears you can control which aspects of the emulation are enabled, and what speed the screen updates will be limited to. [image]

You can also control the appearance of angles for the orientation sliders (note that this is a purely visual preference; it doesn't affect the output of the emulated sensors in any way). it's just a vibe check, not a science change πŸ’…


πŸ¦‹ REPLAY πŸ¦‹

Recordings of actual sensor readings from a Sense HAT can be replayed within the emulator! From the "File" menu, select "Replay recording". From the file selection dialog that appears, select the recording you wish to replay and click "Open". The replay will immediately begin, with progress displayed in a bar at the bottom of the main window. You can click "Stop" (next to the progress bar) to terminate playback of the recording. [image]

During playback, the sensor sliders will move according to the data in the recording but will be disabled (to prevent the user affecting the replay). At the end of the replay (or immediately after termination of playback), the sliders will be left at their present positions and re-enabled. slay, it puts itself back together 😌


πŸ’œ AUTHOR πŸ’œ

Raspberry Pi Foundation


2016-2021 Raspberry Pi Foundation


and that's the whole page bestie 🫢 version 1.2, dated Sep 02, 2021 β€” go emulate something iconic πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from