oh ok
Maybe more easy is give the original code (from where you pick your code) and tell what you are trying to do. Your code makes no sense, because in the function map()
you must input one variable value (in your case maybe LeftVal
) and 4 constant values minimum and maximum of the original scale and minimum and maximum of the final scale.
For example in these line you have other errors:
if(Ps3.disconnect)
(
Left.write(pos = 0) // This is so if the controller drops out of range it wont keep going
Right.write(pos = 0) // Same as above
}
I believe that first you need to do some easy things and try to understand the language, and then you can do harder things.