However, in many situations we desire to have analogue states which are somewhere in between these two. Generally, any digital device like an Arduino deals only with two states i.e.
In this tutorial, I will explain the theory behind PWM (Pulse Width Modulation) and how to use it with an Arduino to control the brightness of an LED.