output = (reading+130)*10/16
should do it. Where I assume you are reading -130 to +30.
Thus, a reading of -130 will give output = 0
and a reading of +30 will give output = 100
output = (reading+130)*10/16
should do it. Where I assume you are reading -130 to +30.
Thus, a reading of -130 will give output = 0
and a reading of +30 will give output = 100
or
output = 130-reading
should do it. Where I assume you are reading 130 to 30.
Thus, a reading of 130 will give output = 0
and a reading of 30 will give output = 100
Warning I'm not a teacher
Ohhh yes yes ! I'm so tired... didn't saw as simple as it is !
Regards
Bookmarks