I'm trying to map a range of numbers to a float, but I'm unable to get any resolution beyond whole numbers. In other words I'm getting (for example) 8.00 instead of 8.25.
A quick look at the language documentation shows this:
"The map() function uses integer math so will not generate fractions, when the math might indicate that it should do so. Fractional remainders are truncated, and are not rounded or averaged.".
For anyone else coming this way, from the docs for map():
As previously mentioned, the map() function uses integer math. So fractions might get suppressed due to this. For example, fractions like 3/2, 4/3, 5/4 will all be returned as 1 from the map() function, despite their different actual values. So if your project requires precise calculations (e.g. voltage accurate to 3 decimal places), please consider avoiding map() and implementing the calculations manually in your code yourself.