How to use the Arduino map() function

preview_player
Показать описание
The Arduino map() function is a really handy built-in function. In this video' we'll introduce you to the Arduino map(), talk about what it does, and show you why and how you would use map() in your Arduino projects. Enjoy! Please hit the subscribe button on the lower right of the video!

Рекомендации по теме
Комментарии
Автор

Thank you, that helped me a lot. it was so hard to work with soil moisture sensor's analog read so I had to do an equation to use it properly, but the map function solved all of that. 🌹🌹

Lyrics
Автор

A fairly minor alteration to the map function eliminates the issue with the output mapping to the max value for only the max input and improves the distribution of the output values.

long mapEx( long x, long in_min, long in_max, long out_min, long out_max)
{
return((x - in_min) * (out_max - out_min + 1) / (in_max - in_min + 1) + out_max);
}

DrVanV
Автор

Question..do you need Internet to program Arduino..

jamesboland