for motorLeft the result is ok is correct, as when speed is 0 (zero) it returns 64, but for motorRight the return for speed =0 is -64 !! and not 190-191 as expected for no speed(motor stopped)!!
i have also changed the new range from 1 to 255 and looks ok 127-128 but when changed to 128-255 is a problem.
i guess is ok to use 255 - map(motorRightSpeed, -100, 100, 1, 127) as in case of a motorRight stopped (64) will return 255-64 =191 which is speed zero for MotorRight !!
for motorLeft the result is ok is correct, as when speed is 0 (zero) it returns 64, but for motorRight the return for speed =0 is -64 !! and not 190-191 as expected for no speed(motor stopped)!!
i have also changed the new range from 1 to 255 and looks ok 127-128 but when changed to 128-255 is a problem.
I look forward for an advice
Regards,
Ion.
What datatype is motorRight?
Please post the rest of your code. I suspect that the real problem occurs in a different part of your code.