This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Digital Input

Read the logical value of a digital input pin

Library

Simulink Coder Support Package for NXP FRDM-KL25Z Board/FRDM-KL25Z

Description

Read the logical value of the selected digital input pin. There are 14 pins on the FRDM-KL25Z board that you can use as inputs for digital signals, D0-D13. The digital pin layout for this board is compatible with the standard Arduino Digital Pins.

During simulations without the hardware, this block emits zeroes.

Parameters

Pin

Select a digital pin.

Make sure not to assign the same pin number to multiple blocks within your model.

Sample time

Specify how often this block reads a digital pin value, in seconds. This parameter value defaults to 1/10 second.

View pin map

Click on this button to open a snapshot of the board with a reference to the GPIO pins.