I needed a filter for something on another project, so I implemented the very cool 1 euro filter from:
The parameters are tuned in this gif to make it very obvious, but its controllable.
The code for the filter is at the top of the cart, if you want to see the source. It has a :filter() method that can filter the incoming noisy value.
In the cart: if you click it draws lines. Green line is the input signal, yellow is the filtered signal.
Based on stdlib.p8, built with @stevelavieties.
[Please log in to post a comment]