I am using the code below to interface the Arduino nano and android cell phone to enable serial communication through the USB port. I downloaded the filter library from GitHub https://github.com/JonHub/Filters

I am getting an error saying thet the library is not found. I would really appreciate some suggestions on this.

Here is my code:

 //This code is for arduino communicating to android phone through USb serial port.
 //For arduino nano

 #include <Filters.h>   //implements digital filters which mimic the analog filter, keep track of variable statistics in realtime

char data_read; //character datatype takes up to 1 byte of memory
unsigned int analog_out;
unsigned long time;
float filterFrequency = 10.0;
FilterOnePole lowpassFilter( LOWPASS, filterFrequency );//implements digital RC type filter; both highpass and lowpass

 void setup()
  Serial.begin(115200); //open the serial port and set the baud rate for communication
  // create a one pole (RC) lowpass filter

 void loop()

 void serialEvent() { //Used when data is unavailable yet
 if (Serial.available()) //checks the number of bytes available for reading from the serial port
data_read = Serial.read();

if (data_read == '0') {

  analog_out = lowpassFilter.input( analogRead(0) );
  Serial.print(analog_out + 10000);


  analog_out = lowpassFilter.input( analogRead(1) );
  Serial.print(analog_out + 20000);


  analog_out = lowpassFilter.input( analogRead(2) );
  Serial.print(analog_out + 30000);

/*if(data_read == '0' || data_read == '1' || data_read == '2' || data_read == '3' || data_read == '4' || data_read == '5'){
  analog_out = lowpassFilter.input( analogRead( data_read-48 ) );
  }else if(data_read =='p'){

Here is my error message:

  Arduino: 1.8.5 (Windows 10), Board: "Arduino Nano, ATmega328P"

  C:\Users\daphn\Documents\Arduino\Analog_Serial_out\Analog_Serial_out.ino:4:129: fatal error: Filters.h: No such file or directory

  #include <Filters.h>   //implements digital filters which mimic the analog filter, keep track of variable statistics in realtime


  compilation terminated.

  exit status 1
  Error compiling for board Arduino Nano.

  This report would have more information with
  "Show verbose output during compilation"
   option enabled in File -> Preferences.

2 Answers 2


You have to put the folder with the library files in the folder libraries under your sketchbook folder. Then the IDE should be able to find them.

I think there is also a possibility to save them in the same folder as your .ino file, but it I don't know how exactly you have to do this.

  • I did try including the filters.h header file under the main libraries folder, but still I get the same error. I am wondering if there is any mistake with the source of the header file itself. Usually, when I include external libraries, I place it in the same folder as the code itself and it works.
    – DaphFab
    Commented Mar 5, 2018 at 19:08
  • I tested it with your code and the linked library and it works for me. Check in the IDEs settings, to where the sketchbook folder is set
    – chrisl
    Commented Mar 5, 2018 at 19:45
  • The library is more than a .h file. You need ALL the files, and all placed in a folder named Filters within your libraries folder in your sketchbook. Nothing else will do.
    – Majenko
    Commented Mar 5, 2018 at 20:29
  • @Majenko What do you mean by ALL the files?
    – DaphFab
    Commented Mar 5, 2018 at 22:25
  • 1
    Ok got it. I had already done that before. Anyway, I solved the issue by changing #include <Filters.h> to #include "Filters.h"
    – DaphFab
    Commented Mar 5, 2018 at 22:32

Here is your definitive answer.

You have to do the #include like the following (with double-quotes, not < > brackets)

#include "Filters.h"

This will make Arduino compiler look in the project folder.

Using < > brackets tells the compiler that it is in the standard library area.

I just tested this with the following script.

#include "mytest.h"
void setup() {
  // put your setup code here, to run once:


void loop() {
  // put your main code here, to run repeatedly:


The mytest.h file is blank (has no text in it).

It wouldn't work until I included it using the double-quotes method.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.