Unit RPISENSEHAT
Return to Unit Reference
Description
Raspberry Pi SenstHat Driver unit
The SenseHAT 8x8 LED matrix is presented in Ultibo as an 8x8 pixel framebuffer. This allows full access to the display at both the individual pixel level and also using the higher level console functions to display text and graphics on the matrix.
The framebuffer device supports rotation around the full 360 degrees by supplying the required rotation value in the framebuffer properties when calling FramebufferAllocate() or by calling the SenseHAT specific function RPiSenseFramebufferSetRotation().
As per the official Python libraries, the default rotation (FRAMEBUFFER_ROTATION_0) gives correct viewing when the HDMI port is facing downwards.
The SenseHAT joystick appears as a keyboard device and the pressed buttons are received as key presses that represent the Left, Right, Up, Down and Enter keys.
Constants
RPISENSE_*
RPISENSE_SIGNATURE = $EAEBECED;
|
RPISENSE_FRAMEBUFFER_*
RPISENSE_FRAMEBUFFER_DESCRIPTION = 'Raspberry Pi Sense HAT Framebuffer';
|
Description of RPiSense framebuffer device |
RPISENSE_PHYSICAL_WIDTH = 8;
|
|
RPISENSE_PHYSICAL_HEIGHT = 8;
|
RPISENSE_JOYSTICK_*
RPISENSE_JOYSTICK_DESCRIPTION = 'Raspberry Pi Sense HAT Joystick';
|
Description of RPiSense joystick device |
RPISENSE_JOYSTICK_KEYMAP:array[0..4] of Word = (
| |
SCAN_CODE_DOWN_ARROW,
|
|
SCAN_CODE_RIGHT_ARROW,
|
|
SCAN_CODE_UP_ARROW,
|
|
SCAN_CODE_ENTER,
|
|
SCAN_CODE_LEFT_ARROW
|
RPISENSE_FB*
RPISENSE_FB = $00;
|
|
RPISENSE_WAI = $F0;
|
|
RPISENSE_VER = $F1;
|
|
RPISENSE_KEYS = $F2;
|
|
RPISENSE_EE_WP = $F3;
|
RPISENSE_GAMMA_*
RPISENSE_GAMMA_VALUES_DEFAULT = 0;
|
|
RPISENSE_GAMMA_VALUES_LOW = 1;
|
|
RPISENSE_GAMMA_VALUES_USER = 2;
|
Type definitions
To be documented
Public variables
To be documented
Function declarations
To be documented
Return to Unit Reference