Changes

Jump to: navigation, search

Week 3 Lab

20 bytes added, 06:30, 13 April 2009
no edit summary
from [[Electronic Technologies for Art]]
== Analog Output ==
=== LED Dimming ===
*File->Sketchbook->Examples->Analog->Fading
<code>
analogWrite(ledpin, value); // sets the value (range from 0 to 255)
</code>
PWM (pulse width modulation)
*lights, fading
<youtube v="62gWVWCyw_w" loop="true"/>
== Analog Input ==
* now... driving it with input data, instead of with a loop.
* Q: Looking at the Arduino help for that function (<code>analogRead()</code>), what do you think the value <code>val</code> will be for those highest and lowest voltages at your A_IN pin?
* Q: How can you verify your guess? Try and verify your values, in some way. Anything goes!!!
 
=== other loads ===
==== photoresistor ====
* Q: With the same R2 resistor (10k) from above, replacing R1 with the photoresistor, what range of voltages (and corresponding data values) would you expect to see at your A_IN pin?
* Q: Using methods you invented above, verify your data readings.
 
==== strain gauge ====
==== flex sensor ====
== Analog Output ==
=== LED Dimming ===
*File->Sketchbook->Examples->Analog->Fading
<code>
analogWrite(ledpin, value); // sets the value (range from 0 to 255)
</code>
PWM (pulse width modulation)
*lights, fading
<youtube v="62gWVWCyw_w" loop="true"/>
==== ultrasonic rangefinder ====

Navigation menu