Pressure Sensor

I have a valve on a 9370 Steiger four wheel drive. The pressure sensor on the LS line reads around 60 % in normal operation but when fighting the valve with the steering wheel the pressure drops, exactly the opposite of what AGOpen is looking for. Was thinking somehow inverting it in the code below… 1. Is that possible. 2. Is there a valid number that code has to see before it will send it to the PC?

  sensorSample = (float)analogRead(PRESSURE_SENSOR_PIN);
      sensorSample *= 0.25;
      sensorReading = sensorReading * 0.6 + sensorSample * 0.4;
    

The Teensy analogRead() function will return 0-1024.

So just change

sensorSample = (float)analogRead(PRESSURE_SENSOR_PIN);

to

sensorSample = (float)1024-analogRead(PRESSURE_SENSOR_PIN);

Thanks @WildBuckwheat ill give it a try and see if it solves my problem.