Changes

Jump to: navigation, search

Classes/2010/VIS147A/Lab8

172 bytes added, 15:36, 2 March 2010
Analog Output
* ...try it out? What do people in the Arduino forums say?
==== Analog Output ====
Continually varying signals, rather than discrete "steps". How does a digital microprocessor create an analog output?
Using Pulse Width Modulation (PWM), setting the duty cycle (and effective voltage) of an on-off signal. This happens 500 times per second (500 Hz).
PWM, duty cycle, and effective voltage===== LED Dimming =====Open the example ''Examples->Analog->Fading''. The crux of this sketch is the <code>analogWrite</code> function.
=== LED Dimming ===*File->Sketchbook->Examples->Analog->FadingThe crux of this sketch is the function <code>analogWrite() </code> only works on some digital output pins. Look up the help for the function, it will tell you which pins work: in our case digital pins 3,5,6,9,10, and 11. [[Image:Freeduino_seedstudio_labelled_PWM. png]]
NOTE: The function <code>analogWrite()</code> only works on some digital output pins. Look up the help for the function, it will tell you which pins work: Digital pins 3,5,6,9,10, and 11.
<youtube v="62gWVWCyw_w" loop="true"/>

Navigation menu