unable to get the consistent values by flex sensor with arduino

Hello,
i am getting a problem. i am unable to get the consistent values . I am using flex sensor, with 47 k ohms resistor with arduino lilypad.
i attached my code, looking forward to help.

thanks

flex.ino (1.77 KB)

I didn't look at your code. Will it work if you average the values over a short period of time?

Paul

Not sure what you mean by "consistent". Please post some examples of the output values, and tell us what you expect to see.