Go Down

Topic: Can I use: map (a, 1,1000, 25, x ) ? (Read 188 times) previous topic - next topic

laoadam

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

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.

laoadam

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.

GolamMostafa

#3
Mar 30, 2019, 10:23 am Last Edit: Mar 30, 2019, 10:24 am by GolamMostafa
I'll do it.
How? The map() function demands that the first argument should be the variable that you want to map.

neiklot

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.




GolamMostafa

#5
Mar 30, 2019, 11:00 am Last Edit: Mar 30, 2019, 11:01 am by GolamMostafa
They just mean the value of toHigh is in a variable, not hardcoded into the map.
Quote
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.

Go Up