Making sure the threshold bar is exactly halfway when it is 50%
setting the threshold bar to be between min and max
min and max adjust each other for scaling pin sensor values