Difference between revisions of "Week 3 Lab"
From Robert-Depot
(→LED Dimming) |
(→LED Dimming) |
||
Line 12: | Line 12: | ||
analogWrite(ledpin, value); // sets the value (range from 0 to 255) | analogWrite(ledpin, value); // sets the value (range from 0 to 255) | ||
</code> | </code> | ||
+ | '''P''''ulse '''W'''idth '''M'''odulation | ||
*lights, fading | *lights, fading | ||
<youtube v="62gWVWCyw_w" loop="true"/> | <youtube v="62gWVWCyw_w" loop="true"/> |
Revision as of 21:25, 12 April 2009
from Electronic Technologies for Art
Contents
Analog Input
- Potentiometer
- photo-resistor
- strain gauge
Analog Output
LED Dimming
- File->Sketchbook->Examples->Analog->Fading
analogWrite(ledpin, value); // sets the value (range from 0 to 255)
P'ulse Width Modulation
- lights, fading
<youtube v="62gWVWCyw_w" loop="true"/>
Motor Speed Control
- Basic motor control (DC motors) see week 5
Sound, Tone Generation
- sounds, tone generation