Pulse-width Modulation

Introduction
Let's say we are building a robotic car that will need to change speeds to optimally n avigate through curves and bends in a course. Because most of our electronics can only output digital signals (on or off), how can we change the motor speed to anything other than full power and off? Enter PWM.

How it Works


Pulse-width Modulation (PWM) is a common technique for getting analog results with digital means. By pulsing a digital output, we can emulate different motor speeds quickly, easily, and fairly accurately. Essentially, the motor speed will be a ratio of how long we output HIGH compared to LOW (see image on right).

Arduino Uno
The Arduino Uno has a built in command called "analogWrite(<0-255>)." Using PWM it simulates an analog output signal. For further information check out their explanation of PWM.