Quote Originally Posted by mackrackit View Post
Maybe something like this?

If reading1 > reading2 then
diff = reading1 - reading2
else
diff = reading2 - reading1
endif

Then maybe set a flag to know which calc was used?
Thanks, that looks simple enough for a start tonight.

I'd like to take the difference value and average it too, before deciding if the change is big enough to use and not just sensor noise. To average the raw output of the sensor needs 32bit math I think, so this has got to be easier for me.