What is Flex sensor?
Flex sensor, resistive sensor also works as the potentiometer. It is a flexible strip that changes its resistance when bent. The bigger curvature creates the bigger resistance.
How it works?
One side of the sensor is printed with a polymer ink that has conductive particles embedded in it. When the sensor is straight, the particles give the ink a resistance of about 30k Ohms. When the sensor is bent away from the ink, the conductive particles move further apart, increasing this resistance. When the sensor straightens out again, the resistance returns to the original value. By measuring the resistance, you can determine how much the sensor is being bent.
Let’s build the circuit !
The circuit here include an extra resistor which makes a voltage divider to make the reading possible.
Trail A /
Create a gradually brighter LED light that controlled by Flex sensor
We can connect the flex sensors with mini speaker and use Arduino tone library to play some music !
Arduino code /
Use analog pin A0 for the Flex sensor, digital pin 3 for the speaker