Introduction
We use digital input to read if a switch or sensor is ON or OFF. It helps the Raspberry Pi know what is happening in the real world.
To check if a button is pressed or not.
To detect if a door is open or closed using a sensor.
To read signals from simple sensors like motion detectors.
To monitor if a device is powered ON or OFF.
To control a program based on physical switches.