Recent Changes - Search:

Reference Links

Topics

Programming

Prior Class Pages

PM Wiki

edit SideBar

AnalogOutput

Analog output with Arduino is based on PWM which stands for "Pulse Width Modulation". PWM is the practice of pulsing an output pin up and down in a very rapid sequence. While the Arduino cannot output voltage other than 0V or 5V, by writing a pin rapidly high and then low, we can output an average voltage over a very short time (a few milliseconds) that mimics a voltage between 0V and 5V.

To write out voltage, we specify a number from 0 - 255 and write that number to one of our digital pins labeled with the "~" symbol.

Here is a link to the Arduino page on PWM.
http://arduino.cc/en/Tutorial/PWM

PWM Page on Wikipedia - probably a lot more info than you need though :)
http://en.wikipedia.org/wiki/Pulse-width_modulation

PWM is necessary for doing things like:

  • controlling servo motors
  • fading LEDs
  • mixing colors for RGB LEDs
  • changing motor speeds
  • any output that requires more than a simple "on" or "off"
Edit - History - Print - Recent Changes - Search
Page last modified on February 24, 2014, at 02:40 PM