Skip to content

Instantly share code, notes, and snippets.

@mrizvic
Created October 2, 2016 12:30
Show Gist options
  • Save mrizvic/cc8400e6524cdb6503efd8d7eb4f1c0f to your computer and use it in GitHub Desktop.
Save mrizvic/cc8400e6524cdb6503efd8d7eb4f1c0f to your computer and use it in GitHub Desktop.
### https://www.arduino.cc/en/Reference/Map
### I find this useful
def remap(x, in_min, in_max, out_min, out_max):
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment