I have always used the Arduino IDE map function but have not been able to use it for float values. With these I have made the MapFloat Library so that I could extend the map function to floating point numbers.
A very useful feature when I want to have decimal places on my map function.
A library that contains the mapFloat function which re-maps a floating point number from one range to another. The mapFloat function is inside the MapFloat library.
This library is based on the Arduino Map Function.
Here is a link to the reference of Arduino Map Function.
Download the MapFloat Library from RadishLogic’s Github repository.
Clone or Download >> Download ZIP. This will download the file MapFloat-master.zip.
Unzip the MapFloat-master folder inside the zip file and paste it on the library folder where your Arduino IDE is installed. Continue reading Arduino MapFloat Library Documentation