Use map: map() / Reference / Processing.org
map(value, start1, stop1, start2, stop2)
so:
mappedVal = map(rawVal, 0, 125, -9.8, 9.8);
Use map: map() / Reference / Processing.org
map(value, start1, stop1, start2, stop2)
so:
mappedVal = map(rawVal, 0, 125, -9.8, 9.8);