Fritzing Creator Kit - #06 Fading
Let the LED fade.
An Arduino board cannot realise a real analog output, so it uses a trick to do this. It simply switches a channel on and off very quickly. This process is called PWM (Pulse Width Modulation). The ratio between on and off is what controls – for example – the brightness of an LED (or how bright the LED appears to us).
The Arduino UNO board has six PWM channels, marked on the board with a wavy line. The pulse width modulation can output values from 0 (all the way off) to 255 (all the way on).*
The circuit example consists of an LED that is connected to a PWM channel through a series resistor.