scaling a range of numbers to another range

You want the map function: http://arduino.cc/en/Reference/Map

1 Like