Read the state of five-position Joystick
Simulink Support Package for Raspberry Pi Hardware / Sense HAT
Read the state of five-position Joystick. The block outputs a value between 0-5 based on the Joystick button pressed. The Joystick button positions are shown.
The positions on the Joystick that correspond to the five values of the block output are:
0- when you have not pressed a button
1- when you press the centre button
2- when you press the left button
3- when you press the top button
4- when you press the right button
5- when you press the bottom button.
Port_1— Output port to return value of the Joystick button
This is the output port that returns the value of the button pressed on Joystick.
View Position information— View the position of the Joystick button position
Click this button to know the position of the button pressed. The picture shows the positions of the Joystick button and the position of the other sensors on the SenseHAT board.
Sample time— Frequency at which data is read from pressure sensor
Specify how often this block reads the data from the pressure sensor.