Filters compiling error

Hi
I have this error

Filters/Butterworth.hpp: No such file or directory

Where I can find it ?

#include <Filters/Butterworth.hpp>

const double f_s = 100.0; // Sampling frequency in Hz
const double f_c = 10.0;  // Cut-off frequency in Hz

// Create a 4th-order Butterworth low-pass filter
auto filter = butter<4>(f_c, f_s); 

// In your loop/sampling function:
float raw_signal = analogRead(A0); // Get raw data
float filtered_signal = filter(raw_signal); // Apply filter

Hi, @tom321

Where did you get the code?
That should have the relevant information.

Please post your complete code.

Tom.... :smiley: :+1: :coffee: :australia:

A quick Google;

Filters/Butterworth library arduino

Seems to be the one, but look at the Butterworth Example, there is an important line of code before ;
#include <Filters/Butterworth.hpp>

Tom.... :smiley: :+1: :coffee: :australia:

Filters/Butterworth.hpp: No such file or directory
A library named Arduino-Filters-master already exists

Hi,
Where did you get the code, a link would help.

Thanks.. Tom.... :smiley: :+1: :coffee: :australia:

AI.................

Can you please tell us your electronics, programming, arduino, hardware experience?

Tom.... :smiley: :+1: :coffee: :australia:

I am a retired electronics engineer with some knowledge of Arduino.

In order to correct use of Arduino-Filters library and all it's parts (as Filters/Butterworth.hpp file) your Arduino code should starts from the line

#include <Filters.h>

post #7

on google

Filters/Butterworth.hpp

post #10

#include <Filters/Butterworth.hpp>
#include <Filters.h>

const double f_s = 100.0; // Sampling frequency in Hz
const double f_c = 10.0;  // Cut-off frequency in Hz

// Create a 4th-order Butterworth low-pass filter
auto filter = butter<4>(f_c, f_s); 

// In your loop/sampling function:
float raw_signal = analogRead(A0); // Get raw data
float filtered_signal = filter(raw_signal); // Apply filter

error the same

it must be

Did you try to open the library examples?

error

exit status 1
AH/Timing/MillisMicrosTimer.hpp: No such file or directory

A library named Arduino-Filters-master already exists

I don't know how you do it. I just did it all from the beginning:

  1. Download the library ZIP archive from the GitHub and installed ZIP in Arduino IDE..
  2. Opened a new sketch in Arduino IDE.
  3. Selected the Arduino Uno board.
  4. Go to File->Examples->Arduino Filters-> Filters->ButterWorth
  5. Press the Compile button
  6. Result:
Using library Arduino-Filters-master at version 1.0.0 in folder: /home/dmit/Arduino/libraries/Arduino-Filters-master 
/home/dmit/arduino-1.8.19-linux64/arduino-1.8.19/hardware/tools/avr/bin/avr-size -A /tmp/arduino_build_931298/Butterworth.ino.elf
Sketch uses 5256 bytes (16%) of program storage space. Maximum is 32256 bytes.
Global variables use 316 bytes (15%) of dynamic memory, leaving 1732 bytes for local variables.

So the code compiled successfully.

Try to repeat the process exactly as I show it.

Please copy a full error message shown on last screenshot and insert it in the forum AS TEXT using a code tags.

Also please show a listing of your Arduino\libraries directory.

Multiple libraries were found for "Filters.h"
 #include <AH/Timing/MillisMicrosTimer.hpp>
 Used: C:\Users\Galinka\Documents\Arduino\libraries\Filters-0.1.2
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Not used: C:\Users\Galinka\Documents\Arduino\libraries\Arduino-Filters-master
compilation terminated.
exit status 1
AH/Timing/MillisMicrosTimer.hpp: No such file or directory

Delete the directories Filter-master and Filters-0.1.2 with all it's contents. And try to compile example again.