

GitHub - tttapa/Arduino-Filters: Arduino Finite Impulse Response and Infinite Im...
source link: https://github.com/tttapa/Arduino-Filters/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Arduino Filters
Features
- Infinite Impulse Response Filters
- Finite Impulse Response Filters
- BiQuad Filters
- Butterworth Filters
- Notch Filters
- Median Filters
- Simple and Exponential Moving Average Filters
- Hysteresis
These filters were originally part of the
old Filters library.
It has been updated completely, with continuous integration, unit tests, etc.
Documentation
The automatically generated Doxygen documentation for this library can be found
here:
Documentation
Test coverage information can be found here:
Code Coverage
Arduino examples can be found here:
Examples
You might want to start with the Filters Module.
Example: Butterworth filter
#include <Filters.h> #include <AH/Timing/MillisMicrosTimer.hpp> #include <Filters/Butterworth.hpp> void setup() { Serial.begin(115200); } // Sampling frequency const double f_s = 100; // Hz // Cut-off frequency (-3 dB) const double f_c = 40; // Hz // Normalized cut-off frequency const double f_n = 2 * f_c / f_s; // Sample timer Timer<micros> timer = std::round(1e6 / f_s); // Sixth-order Butterworth filter auto filter = butter<6>(f_n); void loop() { if (timer) Serial.println(filter(analogRead(A0))); }
Tools
The python
folder contains some Python scripts to visualize the
frequency response of the filters used in the examples.
Butterworth Filter
FIR Notch Filter
Related Projects
This library uses the Arduino Helpers utility library
Supported boards
For each commit, the continuous integration tests compile the examples for the following boards:
- Arduino UNO
- Arduino Leonardo
- Teensy 3.2
- Arduino Due
- Arduino Nano 33 IoT
- ESP8266
- ESP32
This covers a very large part of the Arduino platform, and similar boards will also work (e.g. Arduino Nano, Arduino Mega, etc.).
If you have a board that's not supported, please open an issue and let me know!
Known limitations
The Arduino Due toolchain provided by Arduino is very old, and has some
configuration problems. As a result, some math functions are not available.
There is nothing I can do about it in this library, it's a bug in the Arduino
Due Core.
Recommend
-
11
Edge Impulse and TinyML on Raspberry Pi Raspberry Pi is probably the most affordable way to get started with embedded machine learning. The
-
12
IntroductionRarely do we manage to carry coffee around without spilling it once (Fig. 1). In fact, due to the very commonness of the phenomenon, we tend to dismiss questioning it beyond simply exclaiming: “J...
-
4
Edge Impulse lands $34M as the TinyML market continues to grow Join gaming leaders, alongside GamesBeat and Facebook Gaming, for their 2nd Annual GamesBeat & Facebook Gaming Summi...
-
8
Event Trilha Impulse-React Native do evento Next Level Week 7 Jan 09, 2022 1 min read Heat React Native Este projeto foi feito no even...
-
11
-
7
Moving things around — Impulse Space is betting on a future where launch is cheap "What happens to space if the cost of access to space is essentially free?"...
-
14
MIDI controller This is a library for creating a MIDI controller using an Arduino board. It enables you to easily create MIDI controllers or instruments with very few lines of code. It supports digital inputs, like pushbuttons and s...
-
9
docker-arm-cross-toolchain Repository with ARM cross-compilation toolchains, built using Docker and crosstool-NG. Includes C, C++ and Fortran cross-compilers (GCC 11.2),...
-
3
Note: The toolchains themselves have been moved to a separate repository:tttapa/docker-arm-cross-toolchain
-
8
py-build-cmake Modern, PEP 517 compliant build backend for building Python packages with extensions built using CMake. Features Build and packag...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK