Increasing output of the Flex sensor for servos


I've made a robot hand which moves via a servo. See it here

The problem is that this version uses a potentiometer to get that range of movement but I want to use the flex sensor which just makes the fingers wiggle a bit.

How do I increase the range of movement with a flex sensor?

Thank you

You could use the map() function:

servo.write(map(flex_value, MIN_FLEX_VALUE, MAX_FLEX_VALUE, 0, 180);
servo.writeMicroseconds(map(flex_value, MIN_FLEX_VALUE, MAX_FLEX_VALUE, 1000, 2000);