Read logical state of button
Simulink Coder Support Package for BeagleBone Blue Hardware
The Button block reads the logical state of a user-configurable button on the hardware. The hardware has two user-configurable buttons, Mode and Pause, with two logical states, pressed and released.
During simulations without hardware, this block outputs zeros. See Block Produces Zeros or Does Nothing in Simulation (Simulink).
Port_1— Logical state of button
When the button specified in the Button parameter
is pressed on the hardware, the block outputs
the button specified in the Button parameter is
released on the hardware, the block outputs
example, if the Button parameter on the Block
Parameters dialog box is set to
Mode, and the
Mode button on the hardware is pressed, the block outputs
1. When the Mode button is released, the block
Button— Hardware button
Select the button of which the logical state (pressed or released) is to be read.
Sample time— Interval at which block reads button state
Specify how often the block reads the state of the button specified in the Button parameter.