Main Content

Digital Output

Set logical value of digital output pin

Library

Simulink Support Package for Arduino® Hardware/Common

Description

Set the logical value of a digital pin on the Arduino hardware:

  • Sending 1 to the block input sets the logical value of the digital pin HIGH to 5 V or 3.3 V, depending on the board voltage.

  • Sending 0 to the block input sets the logical value of the digital pin LOW to 0 V.

The block input inherits the data type of the upstream block, and internally converts it to boolean.

During simulations without the hardware, this block does nothing.

Parameters

Pin number

Enter the number of the digital pin.

Do not assign the same pin number for different types of blocks as this may cause resource management conflicts.

Click View pin map to open the Arduino Pin Mapping table.

To know how to assign pins or to know about the fixed pins for the block, see Arduino Pin Mapping for Timer Independent Blocks.