Changes

Jump to: navigation, search

Week 3 Lab

273 bytes removed, 15:28, 14 April 2009
photoresistor
* take the photoresistor from your 147A kit, which has a resistance between 140k - 800, depending on your lighting conditions.
* 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: How could you make this more sensitive? There are least three ways to try... think in terms of the physical enclosure around the sensor, the hardware setup (a voltage divider), and the software (look at File->Sketchbook->Analog->Calibration..., specifically the <code>map()</code> function)* Q: Would Does changing the code make it this more sensitive? <code> val = analogRead(potPin); // read the value from the sensor digitalWrite(ledPin, HIGH); // turn the ledPin on delay(val); // stop the program for some time digitalWrite(ledPin, LOW); // turn the ledPin off delay(val); // stop the program for some time</code>
=== flex sensor ===

Navigation menu