Theory
Theory :
Arduino senses the environment by receiving inputs from add-on
devices such as sensors, and can control the world around it by
adjusting lights, motors, and other actuators. In this class you
will learn how and when to use the different types of sensors and
how to connect them to the Arduino.
We all know switch is an input device and used; to make or break an
electrical connection. Now let’s learn Interfacing of Switch and
Arduino, Here we will use switch to take input signal to the
microcontroller so that we will be able to interface more input
devices to the microcontroller, like sensors output as input to
microcontroller.