<< DIGITAL_READ_SB Arduino toolbox ENCODER_SB >>

Arduino toolbox >> Arduino toolbox > DIGITAL_WRITE_SB

DIGITAL_WRITE_SB

Sends a logical value 0 or 1 to an Arduino GPIO line

Overview

Contents

Palette

Arduino

Description

The Arduino uses a number of GPIO (General Purpose I/O) lines to read or write single bit electronic components.

On an Arduino Uno the logic ports 2 to 13 are available (ports 0 and 1 are used for serial communication). On the Arduino Mega ports 2 to 53 are available. The port takes the value 0 (ground) or 1 (logic high level = 5V on the Arduino Uno or Mega).

Parameters

The port number to be chosen between 2 and 53, depends on the type of Arduino used.

The card number when several cards are in use. Must be 1 for the moment

Example 1

The example below show the use of the block in case of a circuit consisting of a push button connected to GPIO 7 and a LED connected to GPIO 10. When the push button is pressed the LED lights up.

See also


Report an issue
<< DIGITAL_READ_SB Arduino toolbox ENCODER_SB >>