Home VPN WorkPlace Web Sites/Apps Small Business Other Apps Contact Guides

Arduino Useful Functions

delay: wait/sleep in milliseconds
delay(1000);

map: convert from one range to another
newValue = map(oldValue, oldRangeStart, oldRangeEnd, newRangeStart, newRangeEnd);
newValue = map(oldValue, -100, 100, 1000, 2000);

constrain: constrain to a range
newValue = constrain(oldValue, rangeStart, rangeEnd);
newValue = constrain(oldValue, -100, 100);