Can I adjust code to use lower potentiometer value?

I'm working on a project that will use potentiometers to control several motors. I want to know if it's possible to modify the code to adapt to a potentiometer with a lower resistance than normal. Say, to allow a 2k pot to control in the place of a 10k pot.

I assume you mean a pot between 5volt and ground, with the wiper going to an analogue input. Then the pot can be any value. It is only working as a voltage divider. No code adjustment.

I would keep values between 1k and 50k. Too low, and the pot itself will use too much power. Too high, and the A/D converter becomes inaccurate. Leo..

How do you have them wired?

If they're connected between ground and Vcc, then no changes are needed (and there's a little more current going though the pot - 2.5ma instead of 0.5).

If you're relying on the current flowing through the pot, though that would need to be looked at.