mapping values

but i'm unable to verify it (because I don't have my hardware here)

You need a PC running the Arduino IDE, NOT an Arduino, to verify code.

Come back when you have done that!