I'm on circ-13 of the "Experimenter's Guide for Arduino" and looking forward to my certificate of completion/UNO degree when I nail this one (I'll make that myself).
The result I'm getting is an LED that's on 100% of the time, and the serial monitor is showing a value of
I've rewired this a couple of times. That doesn't seem to solve it. I've also taken a multimeter to the FSR. it seems to give values that you would expect (high resistance for no pressure and decreasing resistance as pressure is applied).
circ-13_ pressure sensor- no reading
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Franklin97355
- Posts: 23940
- Joined: Mon Apr 21, 2008 2:33 pm
Re: circ-13_ pressure sensor- no reading
Post some photos of your circuit and, if you modified the code at all, your code. We'll take a look.
- jim_lucas
- Posts: 11
- Joined: Fri Jun 10, 2016 2:15 pm
Re: circ-13_ pressure sensor- no reading
I've attached a photo of the circuit.
Here's the code (I changed the variable names slightly because I tried to do 2 sensors right out of the gate- when that didn't work I went back to sensor):
---
int sensePin1=2;
int ledPin1=9;
void setup() {
Serial.begin(9600);
pinMode(ledPin1,OUTPUT);
}
void loop() {
int value1 = analogRead(sensePin1)/4;
analogWrite(ledPin1,value1);
Serial.println(value1);
}
---
Note: I forgot to say the value I was getting from the serial port. It started at about 112, and then stabilized at about 86.
Also note: I tried changing the resistor value that goes from FSR. I tried 1K and 5K. That didn't do anything.
Here's the code (I changed the variable names slightly because I tried to do 2 sensors right out of the gate- when that didn't work I went back to sensor):
---
int sensePin1=2;
int ledPin1=9;
void setup() {
Serial.begin(9600);
pinMode(ledPin1,OUTPUT);
}
void loop() {
int value1 = analogRead(sensePin1)/4;
analogWrite(ledPin1,value1);
Serial.println(value1);
}
---
Note: I forgot to say the value I was getting from the serial port. It started at about 112, and then stabilized at about 86.
Also note: I tried changing the resistor value that goes from FSR. I tried 1K and 5K. That didn't do anything.
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: circ-13_ pressure sensor- no reading
You are missing the connection from the FSR to analog pin 2. The analog value is 'floating', since there is no connection to the pin.
- jim_lucas
- Posts: 11
- Joined: Fri Jun 10, 2016 2:15 pm
Re: circ-13_ pressure sensor- no reading
You're right... I adjusted and it worked. I really appreciate you reviewing and helping out.
. . . . <= tears of thankfulness, dissipated hopelessness and released frustration.
. . . . <= tears of thankfulness, dissipated hopelessness and released frustration.
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: circ-13_ pressure sensor- no reading
Awesome! Happy to help. :)
Please be positive and constructive with your questions and comments.