Arduino project: Using the map() function for value scaling

When working with analog input pins on an Arduino, the acquired values are typically in the range of 0 to 1023. This is because the analog read resolution is 10 bits, resulting in a range of 2^10, which is 1024. However, on certain ARM-based Arduino devices such as Arduino Zero, Arduino Due, and the Arduino MKR family, it is possible to extend the resolution to 12 bits by calling the analogReadResolution(12) function....