This video outlines how to use Pulse-Width Modulation (PWM) to control the brightness of an LED on the Raspberry Pi. Both the relevant theory and Python program are discussed.
Learn more about programming, electronics, and the Raspberry Pi at:
http://cutequbit.zapto.org