A simple flex sensor 2.2" in length. As the sensor is flexed, the resistance across the sensor increases.The resistance of the flex sensor changes when the metal pads are on the outside of the bend (text on the inside of bend). The connector is 0.1" spaced and breadboard friendly.
These 2.2" Flex Sensors can be easily integrated to an Arduino or Raspberry Pi by making a voltage divider circuit using a 10 K Ohm resistor at any one lead of the sensor.
Use the following Code to integrate a Flex Sensor with an Arduino
/* How to use a flex sensor/resistor - Arduino Tutorial
Fade an LED with a flex sensor
const int ledPin = 3; //pin 3 has PWM funtion
const int flexPin = A0; //pin A0 to read analog input
int value; //save analog value
pinMode(ledPin, OUTPUT); //Set pin 3 as 'output'
Serial.begin(9600); //Begin serial communication
value = analogRead(flexPin); //Read and save analog value from potentiometer
Serial.println(value); //Print value
value = map(value, 700, 900, 0, 255);//Map value 0-1023 to 0-255 (PWM)
analogWrite(ledPin, value); //Send PWM value to led
delay(100); //Small delay
Bends and Flexes physically with motion device,
Possible Uses.: Robotics, Gaming (Virtual Motion), Computer Peripherals.
Simple Construction Specifications:
Flat Resistance: 10K Ohms,
Resistance Tolerance: ±30%,
Bend Resistance Range: 60K to 110K Ohms,
Power Rating: 0.50 Watts continuous. 1 Watt Peak,
Temperature Range: -35°C to +80°C.