def METHOD_NAME(x, in_min, in_max, out_min, out_max):                                      # same as Arduino map() but with floating point numbers
    return ((x - in_min) * (out_max - out_min)) / ((in_max - in_min) + out_min)         # linear mapping, same as Arduino map()