Hue-controllable RGB LED lamp

Hey Peoples,

I Have implemented this code in a project and it works great. I am using a 10k pot and it gives me all the range of color I need.

I wanted to use a flex sensor (variable resistor) to control hue. However when I plugged it into the circuit it doesn't give me the same range I am only getting about half. I know that it is because the flex sensor has a different range of ohms. The flex sensor has a range of about 11k - 40k ohms. Since the flex sensor only has 2 pins I am using a 10K resistor in between on of the pins and ground. I have tried fooling around with some numbers in the code, but not with any luck. I know there are some ways to connect supplemental resistors in parallel to change values, but I am a bit confused.

Is there a way to do what I want with the flex sensor I have and is it a hardware problem or a program problem?

Any help would be greatly appreciated...

Thanks
rr