5,710
edits
Changes
→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.
* Q: How could you make this more sensitive? There are least three ways to try... think in terms of the physical enclosure, the hardware setup (a voltage divider), and the software (look at File->Sketchbook->Analog->Calibration...)
* Q: Would changing the delay in the code make it 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>
==== strain gauge ====
see page 32 in Forest Mims "Electronic Sensor Circuits & Projects" to make your own.