Map() function

Yes, you can do that with map as long as the whole thing is linear, but I don't understand what you want. Do you have one or two input values or just one. If you would make a little table, things are easier. Something like:

Pot = 505 -> Motorcontrol = 505
Pot = 1023 -> Motorcontrol = 1023
Pot = 0 -> Motorcontrol = 0

In that case, the function to use is: motor = pot;

If it was:
Pot = 505 -> Motorcontrol = 0
Pot = 1023 -> Motorcontrol = 1023
Pot = 0 -> Motorcontrol = -1023

use: motor = map(pot, 505, 1023, 0, 1023);

To constrain the values in case of slightly asymmetric and to prevent excessively high values, you could expand that to: motor = constrain (map(pot, 505, 1023, 0, 1023), -1023, 1023); But in most cases that shouldn't be necessary.

If it was something else, you'd have to tell us what you want.

Korman