My most recent project is reading servo signals with an Arduino. This works quite fine at this point but I was wondering how I could increase the accuracy of the detected pulselengths. As I am not in need of an enormous reaction speed, I thought about filtering/averaging the values.
My first thought was this:
averagedValue = ( averagedValue + newValue ) / 2;
Of course this could be tweaked to what fits best, by simply writing:
averagedValue = ( (ratio * averagedValue) + newValue ) / ( ratio + 1 );
Now, my question is: Are there any other filtering/avering methods that work better/are more feasable for this project?
Thanks in Advance!!!