defined sensor value, removed encoderReset from main loop