Home
Laboratories
Robotics Lab
Electronics Lab
Embedded Lab
VLSI Lab
Cyber Lab
Astronomy Lab
Mathematics Lab
Telecomunication Lab
Computer Science Lab
Quizzes
Sitemap
Contact Us
You Are Here
:
Home
»
Embedded Lab
»
Arduino
»
Force Sensitive Resistor (FSR)
Articles added in
Mathematics Lab
|
Cyber Lab
is now open |
Astronomy Lab
is now open |
VLSI Lab
is now open |
120 SEO Tips
article published | More exciting articles coming soon!
Force Sensitive Resistor (FSR)
Sensor Image
Circuit Diagram
Code
int fsrPin = 0; // the FSR and 10K pulldown are connected to a0 int fsrReading; // the analog reading from the FSR resistor divider void setup(void) { // We\\\'ll send debugging information via the Serial monitor Serial.begin(9600); } void loop(void) { fsrReading = analogRead(fsrPin); Serial.print("Analog reading = "); Serial.print(fsrReading); // the raw analog reading // We\\\'ll have a few threshholds, qualitatively determined if (fsrReading < 10) { Serial.println(" - No pressure"); } else if (fsrReading < 200) { Serial.println(" - Light touch"); } else if (fsrReading < 500) { Serial.println(" - Light squeeze"); } else if (fsrReading < 800) { Serial.println(" - Medium squeeze"); } else { Serial.println(" - Big squeeze"); delay(1000); } }
Video
CACKL
E
comment system
Tweets by @z_series