Link Search Menu Expand Document

Digital Input and Output

“Digital” refers to the binary values of 1 or 0. A digital signal represents an on or off state.

Table of contents

  1. Applications
  2. Digital signals and values
  3. Setting the pinMode
  4. Setting a digital output
    1. Reading a digital input

Applications

Digital I/O is used in the following applications.

  • Sending on/off control signals
  • Turning low-powered devices such as LEDs on and off
  • Reading digital inputs such as buttons

Digital signals and values

Setting the pinMode

Digital pins on an Arduino can be configured for input or output. When configured for output, the digital pin can be set to HIGH or LOW. HIGH represents being “on”. LOW represents being “off”. When a digital pin is used for input, the result is a value of HIGH or LOW depending on the voltage level of that pin.

Setting a digital output

Reading a digital input