Microcontrollers are digital devices at heart. They can do fancy things like convert analog signals into a digital value but going the other direction is a bit tougher. Pulse-Width Modulation is used ...