**The example codes were tested on Arduino NANO.**
## Examples Folder:
Within the examples folder there is a short instruction file 'ReadMe.txt' on how to generate the '.ino' files for each type of filter.
The generated '.ino' file has a function of type 'xxx_Update (float x)' which is responsible for updating the filter output. In the examples, the 'Main.ino' files give an example of how to use it.
In the 'Main.INO' examples, the analog input signal of the filter is obtained from the A0 port of the arduino. Both the filter output and the input can be displayed by the serial plotter.
## Filter Testing:
The electronic circuit shown in 'PCAudioCircuit / Schematic.jpg' can be used to connect the sound card output of a computer to the Arduino in order to test the projected filters. It is worth remembering that in an Arduino Nano, for an eighth-order filter, the maximum sampling frequency that can be used is 1000Hz. Thus, the signals that can be injected into the filter input must have components up to 500Hz, according to the Nyquist-Shannon sampling theorem.
**After designing the desired filter always check the execution time of the function 'xxx_Update ()' in order to verify that the configured sampling frequency is being obtained correctly**
## Basic Usage
**Butterworth filters desing:**
- (low-pass): "python butter.py low Name n Fc_Hz Fs_Hz"
- (high-pass): "python butter.py high Name n Fp_Hz Fs_Hz"
- (band-pass): "python butter.py pass Name n Fp1_Hz Fp2_Hz Fs_Hz"
- (stop-band): "python butter.py stop Name n Fc1_Hz Fs2_Hz Fs_Hz"
**Name** - Filter Name (will determine the name of the final .ino file)