SENSE_EMU_GUI(1) | sense-emu | SENSE_EMU_GUI(1) |
sense_emu_gui - Sense HAT emulator
The Sense HAT emulator application. This GTK application provides an interactive interface for emulating the Raspberry Pi Sense HAT.
sense_emu_gui
[image]
The main window is divided into four parts. At the left is a visual representation of the Sense HAT. Scripts using the emulator library (sense_emu) to set the HAT's LEDs will display the result here. Immediately below the LEDs are the rotation buttons which rotate the view of the HAT. These buttons also affect the action of the joystick buttons (covered below).
To the right of the LEDs are three sliders representing the temperature, pressure, and humidity of the emulated HAT's environment.
NOTE:
On the far right of the window, three sliders provide 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 affect 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.
Finally, at the bottom right of the window, a series of buttons are provided to emulate the joystick on the HAT. The buttons will simulate press, release, and hold events generated by the real joystick. When the view of the HAT is rotated, the joystick buttons will act in the new orientation of the HAT. For example, initially the "up" button will send "up" events. After the HAT is rotated 90° the "up" button will send "right" events. After another 90° rotation, the "up" button will send "down" events, and so on.
NOTE:
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).
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.
Raspberry Pi Foundation
2016-2021 Raspberry Pi Foundation
September 2, 2021 | 1.2 |