by plasticeagle · 2y ago · 0 comments
out = last_out * x + input * (1-x)
Where x is between zero and one. Closer to one, the more filtering you'll do. You can cascade these too, to make a higher order filter, which will work even better.
see https://gery.casiez.net/1euro/ with plenty of existing implementations to pick from