SenseHat (FB)¶
FUNCTION_BLOCK SenseHat EXTENDS i2c
This Function Block is instanciated along with the Sense Hat device of the raspberry PI. It’s inputs and outputs allow to easily access the sensors, inputs and LED outputs of the Sense Hat Device.
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
usiAddressUSINTi2c
adwPixelARRAY [0..63] OF DWORD
Pixel array for LED-Output of Sensehat (0..7 Row 1, 8..17 Row 2, etc.). Use 32Bit ARGB color coding to set the color of each pixel.
xUpdatePixelBOOLTRUE
Update Pixel Output: default TRUE
xUpdateJoystickBOOLTRUE
Update Joystick Input: default TRUE
xUpdateLSM9DS1BOOLTRUE
Update LSM9DS1 Input: default TRUE
xUpdateAccelerometerBOOLTRUE
xUpdateGyroscopeBOOLTRUE
xUpdateMagnetometerBOOLTRUE
xUpdateHTS221BOOLTRUE
Update HTS221 Input: default TRUE
xUpdateLPS25HBOOLTRUE
Update LPS25H Input: default TRUE
Output
xJoystickUpBOOLFALSE
Joystick input interpretated in senses of the given booleans
xJoystickDownBOOLFALSE
xJoystickLeftBOOLFALSE
xJoystickRightBOOLFALSE
xJoystickEnterBOOLFALSE
rTemperatureHTS221REALTemperature of HTS221 in degree celcius (°C).
rHumidityREALHumidity of HTS221 in percent of 100 (%).
rTemperatureLPS25HREALTemperature of LPS25H in degree celcius (°C).
lrPressureLREALPressure of LPS25H in hecto pascal (hPA).
rGyroXREALGyroscope X direction data of LSM9DS1 (dps - degree per second)
rGyroYREALGyroscope Y direction data of LSM9DS1 (dps - degree per second)
rGyroZREALGyroscope Z direction data of LSM9DS1 (dps - degree per second)
lrGyroYIntegralLREALintegral of Gyroscope X direction data of LSM9DS1 [°]
lrGyroXIntegralLREALintegral of Gyroscope Y direction data of LSM9DS1 [°]
lrGyroZIntegralLREALintegral of Gyroscope Z direction data of LSM9DS1 [°]
aiMagRawARRAY [0..2] OF INT
raw values of magnet, gyroscope, accelerometer
aiGyrRawARRAY [0..2] OF INT
aiAccRawARRAY [0..2] OF INT
arGyrCalibARRAY [0..2] OF REAL
calibration data (average offset to 0
arAccCalibARRAY [0..2] OF REAL
udiAccSamplesUDINTnumber of accelerometer samples
udiGyrSamplesUDINTnumber of gyroscope samples
rAccelXREALAcceleration X direction data of LSM9DS1 (G ~ 9,81 m/s^2)
rAccelYREALAcceleration Y direction data of LSM9DS1 (G ~ 9,81 m/s^2)
rAccelZREALAcceleration Z direction data of LSM9DS1 (G ~ 9,81 m/s^2)
lrAccelXIntegralLREALAcceleration X direction data of LSM9DS1 [m/s]
lrAccelYIntegralLREALAcceleration Y direction data of LSM9DS1 [m/s]
lrAccelZIntegralLREALAcceleration Z direction data of LSM9DS1 [m/s]
rCompXREALCompass X direction data of LSM9DS1 (microTesla)
rCompYREALCompass Y direction data of LSM9DS1 (microTesla)
rCompZREALCompass Z direction data of LSM9DS1 (microTesla)
Properties:
Methods:
Structure: