Button

Display button widget on device screen

Library

Simulink Support Package for Android Devices / User Interface

Description

Display a button widget on the device screen. The button has two states: pressed or not-pressed. Tapping the button switches its state.

The Button block outputs a boolean value. If the button state is Pressed, the block outputs 1. If the state is Not Pressed, the block outputs 0. The Button state parameter determines the button state when the app starts.

For simulations with no hardware connected, this block outputs the initial state.

Parameters

Button state

The initial state of the button when the app starts.

Sample time

The frequency with which the button state is read and output.

Smaller values for Sample time require the processor to complete the same number of instructions in less time, which can cause task overruns.

Introduced in R2015a