the value an analog read returns a value from 0-1023 ? so if you just subtract half of that value . - Arduino