You need an arduino board, a led.
Arduino using a digital port to generate a PWM signal. the PWM signal turn on and off the led in a very fast speed. The speed is too fast to see it. Thus led controled by PWM or analogWrite() looks dimmer than led controlled by digitalWrite(). So you can control led brightness using analogWrite().
The Theory of PWM/analogWrite() control the duty time of a cycle. the more high output time, the brighter of the led. And vice versa.
44,140 total views, 7 views today