User Tools

Site Tools


tutorials:learn:sensors:fsr.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:learn:sensors:fsr.html [2010/10/07 19:31]
daigo
tutorials:learn:sensors:fsr.html [2012/03/28 13:16]
jackalope [Simple code for analog FSR measurements]
Line 198: Line 198:
  
 void loop(void) { void loop(void) {
-  fsrReading = analogRead(0);  ​+  fsrReading = analogRead(fsrPin);  ​
   ​   ​
   Serial.print("​Analog reading = ");   Serial.print("​Analog reading = ");
Line 217: Line 217:
   delay(1000);​   delay(1000);​
 } </​code> ​ } </​code> ​
- 
 ==== In-depth code for analog FSR measurements ​ ==== ==== In-depth code for analog FSR measurements ​ ====
 {{  http://​www.ladyada.net/​images/​sensors/​fsrpulldowndia.png?​nolink&​427x338 ​ |}}{{ http://​www.ladyada.net/​images/​sensors/​fsrpulldownsch.gif?​nolink&​184x334 |}} {{  http://​www.ladyada.net/​images/​sensors/​fsrpulldowndia.png?​nolink&​427x338 ​ |}}{{ http://​www.ladyada.net/​images/​sensors/​fsrpulldownsch.gif?​nolink&​184x334 |}}
Line 305: Line 304:
 In this case, our '​bucket'​ is a 0.1uF ceramic capacitor. You can change the capacitor nearly any way you want but the timing values will also change. 0.1uF seems to be an OK place to start for these FSRs.  In this case, our '​bucket'​ is a 0.1uF ceramic capacitor. You can change the capacitor nearly any way you want but the timing values will also change. 0.1uF seems to be an OK place to start for these FSRs. 
  
-<code C><pre style="​border:​ 1px solid #CCCCCC; background-color:​ #f5f5f5; font-family:​ Fixed, monospace;​ +<code C>/* FSR simple testing sketch. ​
-       ​font-size:​ 95%;">/* FSR simple testing sketch. ​+
  
 Connect one end of FSR to power, the other end to pin 2. Connect one end of FSR to power, the other end to pin 2.
/home/ladyada/public_html/wiki/data/pages/tutorials/learn/sensors/fsr.html.txt · Last modified: 2016/01/28 18:05 (external edit)