I agree!
That Avg = (Avg*15 + ADval)/16 running average is only going to work with floating point math.
It's surprising how many times we've seen it used around here in an integer only language.
Charlie, I don't think setting it to ADval first will help, because it is likely to still be a short distance from the real value.
And it's when it's close to the real value that it doesn't move anymore, so it would never get any closer than that first reading.
Bookmarks