Hi! I am very new to the Arduino scene and I am trying to read multiple force resistive sensors. When I used only one FSR sensor it works perfectly, however when I used more than one, the analog reading messes up. For example when I press one sensor (AnalogHeel), only the analogread connected to that sensor is supposed to read it, yet values appear for other sensors as well(AnalogPin1, Analog Pin2). Attached is a picture of what I mean. And below is the code. At first I thought it was a problem with the "int" and I turned it to "const int" for the analog pins. It worked right after I changed it but it still had the same problem the next day.
Maybe use a pulldown resistor to keep all inputs at ground potential until actively "pressed?" Search on analog pin pullup/pulldown. And your code; what @UKHeliBob said.
ANALOG INPUT WIRED TO CLOSED OPEN
no pullup/down GND 0 random
no pullup/down Vcc 1 random
WITH pullup either 0 1
with pullDOWN either 1 0
That is because there is no code to determine that a particular sensor has been pressed and to print its value
What values are returned by the sensors when they are not touched ? If you knew that then you could detect that the reading for a sensor had increased (or decreased) and print just that value
When the sensor is not touched, the value is 0. When AnalogreadingHEEL is touched there should be a value greater than 0. And the rest (AnalogreadingPin1, AnalogreadingPin2) should be =0. Doesn't Analogread already detect that value?
Thanks for everyone's help. I finally figured how to make the fsrs work independently. However one problem came up. Some of the analogs began reading such large and small numbers. This is due to the different types of resistors. Can you explain how the difference in resistors can cause a change in the voltage read in analogs?