Hi
A bit of a long shot, does anyone have a fixed point low pass filter that can be used in Sensor Controller Studio.
Regards
David
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi
A bit of a long shot, does anyone have a fixed point low pass filter that can be used in Sensor Controller Studio.
Regards
David
Hi David,
You can take a look at the iirFilter macro in the capacitive touch example in the event handler A code (see below). This implements a first order IIR-filter.
macro iirFilter(acc, add, divExp) { U16 accInt = acc << 1; accInt -= acc >> (divExp - 1); accInt += add >> (divExp - 1); acc = accInt >> 1; }
Regards,
Nikolaj