How to control brightness

broken image
broken image

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.

broken image

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.