Can I use: map (a, 1,1000, 25, x ) ?

The x is a variable, vary according to a input.

Of course you can. You could also try it out yourself and verify that it works with a few test cases and some debug print statements to the serial monitor.

blh64:
Of course you can. You could also try it out yourself and verify that it works with a few test cases and some debug print statements to the serial monitor.

Thank you blh64, I'll do it.

laoadam:
I'll do it.

How? The map() function demands that the first argument should be the variable that you want to map.
map-1.png

map-1.png

GolamMostafa:
How? The map() function demands that the first argument should be the variable that you want to map.

They just mean the value of toHigh is in a variable, not hardcoded into the map.

neiklot:
They just mean the value of toHigh is in a variable, not hardcoded into the map.

map (a, 1,1000, 25, x ) ?

Then a should be the variable to be mapped; if so, the secondary school's learning was to be changed a little bit where it was taught to use the symbols x, y, z for the representations of variables and the a, b, c for constants.