Multiple bend sensors for Arduino

I am trying to build robot control by finger movement so I choose flex band sensor. Anyone has suggestion how to wire it up?

I tried 2 sensors, the A0 sensor works but A1 doesn't. I think the way to wire them up is tricky and confused me. Single sensor was easy, but up to 2 I have no idea how it works.

flex_multi.jpg

Here is the code I use:

/////////////////////////////////////////////////////////

void setup(){
  Serial.begin(9600);
}

void loop(){
  int sensorA, degreesA, sensorB, degreesB;
 
  sensorA = analogRead(0);
  sensorB = analogRead(1);
 
  degreesA = map(sensorA, 540, 820, 0, 270);
  degreesB = map(sensorB, 540, 820, 0, 270);

  Serial.print("a0: ");
  Serial.print(sensorA,DEC);
  Serial.print("   degA: ");
  Serial.print(degreesA,DEC);
  Serial.print("       a1: ");
  Serial.print(sensorB,DEC);
  Serial.print("   degB: ");
  Serial.println(degreesB,DEC);
 
  delay(100);                    
}

////////////////////////////////////////////////////////

It’s a pot

It’s just a pot. A resistor really --one that can change it’s value. Wire it just like you would any other ADC-friendly part (LDR etc) --10k pull up to one of the connections and to your ADC pin, the other connection to ground.

Thanks!! because the sample

Thanks!! because the sample I found the resister was connect to gound which confuse me how to wire up if I have multiple.

I just update the way I try

I just update the way I try to wire them and sample code I modified from sample code. 2nd sensor is not really showing correct info.

The second picture is correct

The picture that shows just one sensor with gnd, 10k and “to analog input” is the correct one. You simply need to repeat that set-up for each sensor. That’s it. 

(The picture showing 4 (or so) sensors and the arduino (the one with the ??) is not correct)

 

 

I redrew the connections you should have

bendsensor.png

I know I am not a graphic designer. :P The freehand arcs mean that there is no connection between the wires that are crossed.

Yeah, I used the bottom

Yeah, I used the bottom drawing and it works fine but I tried the same way to connect up to 2 but the second sensor doesn’t work. ??? means the question how do I connect them. I am gonna try birdmum’s drawing tonight. (I think that’s how I use last night.)

Thanks birdmum. This is

Thanks birdmum. This is clear image! I think that’s how I use but a bit mass wires last night. I will do it again with cleaner wires after work today.

Dame! stupid me!! After I

Dame! stupid me!! After I clean the mess wires I figure I connect the red wire on A1 at GND…

Everythig works fine now! Thanks for all you guys!!!