Push Button

Read logical state of Push button

  • Library:
  • Simulink Coder Support Package for NXP FRDM-K64F Board

Description

The Push Button block reads the logical state (pressed or released) of the push buttons, SW2 or SW3, that are available on the FRDM-K64F board. The SW2 button is connected to the PTC6 pin on the board. The SW3 button is connected to the PTA4 pin on the board. When the switch is pressed, the block outputs 1. Otherwise it outputs 0.

Ports

Output

expand all

When the switch is pressed, the block outputs 1. Otherwise it outputs 0

Data Types: uint8

Parameters

expand all

Select the switch that you want to read the logical state.

Specify how often the Push Button block reads the state of the button that you select in the Switch parameter. By default, the block inherits its sample time based on the context of the block within the model.

Introduced in R2016b