analogWrite - Power Control

Background

analogWrite() uses PWM or Pulse Width Modulation to control how much power is being delivered via a digital pin. PWM is a technique for getting pseudo-analog results with digital means. It does not write a true analog value. Digital control is used to create a square wave (signal switched between on & off). The average power is increased or decreased by pulsing the voltage at a very fast rate and controlling the "on" time. Used to control intensity like the speed of motors or brightness of LEDs.

 

Hardware Description

 

Software Description

atmega168a_pwm_02.jpg

 

Project Ideas

 

Resources