Making a flex sensor with a photoresistor

The flex sensor works by putting an LED on one end of a fabric tube and a photoresistor on the other. When the tube bends the amount of light reaching the photoresistor decreases which an Arduino can read as a change in voltage. Using this approach saves about $19 relative to the cost of purchasing a real flex sensor.

Here is a video of it in action along with some photos of the build process.