Button

Read logical state of button

  • Library:
  • Simulink Coder Support Package for BeagleBone Blue Hardware

Description

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).

Ports

Output

expand all

When the button specified in the Button parameter is pressed on the hardware, the block outputs 1. When the button specified in the Button parameter is released on the hardware, the block outputs 0. For 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 outputs 0.

Data Types: uint8

Parameters

expand all

Select the button of which the logical state (pressed or released) is to be read.

Specify how often the block reads the state of the button specified in the Button parameter.

Introduced in R2017b