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
RPiSenseHat specific variables
RPISENSE_I2C_DEVICE:String = 'I2C0';
|
RPISENSE_GPIO_DEVICE:String = 'GPIO0';
|
RPISENSE_FRAMEBUFFER_ROTATION:LongWord = FRAMEBUFFER_ROTATION_0;
|
RPISENSE_FRAMEBUFFER_WIDTH:LongWord = RPISENSE_PHYSICAL_WIDTH;
|
RPISENSE_FRAMEBUFFER_HEIGHT:LongWord = RPISENSE_PHYSICAL_HEIGHT;
|
RPISENSE_I2C_ADDRESS:Word = $46;
|
RPISENSE_LSM9DS1_MAGN_ADDRESS:Word = $1C;
|
RPISENSE_LSM9DS1_ACCEL_ADDRESS:Word = $6A;
|
RPISENSE_LPS25H_PRESS_ADDRESS:Word = $5C;
|
RPISENSE_HTS221_HUMID_ADDRESS:Word = $5F;
|
Function declarations
To be documented
Return to Unit Reference