Lilypad - Flex Sensor


flexsensor.jpg
Flex Sensor
Description:

The flex sensor works with resistance in a similar way to the touch sensor. It returns a value depending on how much it is flexed (curved). With this sensor you could, for example, measure the bending of an arm or a finger. This sensor is not in your kit but we do have six of these that can be used in projects if required. The sensor is one-directional. It only works if it is bent away from the side that you can see in the picture.

Connecting:

1. In order to use this sensor one side of it first needs to be soldered to a 10K resistor (Note don't do this yourselves- ask us).
2. Connect the free end of the sensor to the + petal on the Lilypad.
3. Connect the resistor end of the sensor to an analog input pin e.g. a0.
4. Connect the free end of the resistor to the - petal on the Lilypad.

NB: If you are using alligator leads to prototype then make sure that the teeth of your clips make good contact with the metal parts of the sensor petals. If not, you will get inconsistent results.

flexConnect.jpg
Flex Sensor Connected to Lilypad

Getting Data From:

Getting data from any analog input involves writing a sketch to read that input using the anlogRead() function. A good basic example of this is the Arduino example AnalogInSerial sketch (File > Examples > Analog > AnalogInSerial). This sketch will read any analog input and then output the result to the serial monitor. This is a good way to check the range of values that your sensor is giving.

Links:

Little Bird page with schematic