Search code examples
carduino

IRremote.h "no such file or directory"


I am working on Mac

Coming from JS and almost exclusively web development, I have no idea what's going on here.

I've gotten in to hardware programming as a hobby, and caught on to the basics pretty easily. However, I recently started a project involving an IR receiver, and needed to install the IRremote library.

I have moved the downloaded "IRremote" folder into the library directory as the installation said.

When I run the sample test code provided

#include <IRremote.h>

const int RECV_PIN = 7;
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup(){
  Serial.begin(9600);
  irrecv.enableIRIn();
  irrecv.blink13(true);
}

the error No such file or directory shows up every time.

This may be the most blatantly obvious question I've ever asked, but I'm a beginner when it comes to stuff like this. Thank you!


Solution

  • The instructions at https://github.com/z3t0/Arduino-IRremote says (emphasis is mine):

    Installation

    1. Navigate to the Releases page.
    2. Download the latest release.
    3. Extract the zip file
    4. Move the "IRremote" folder that has been extracted to your libraries directory.
    5. Make sure to delete Arduino_Root/libraries/RobotIRremote. Where Arduino_Root refers to the install directory of Arduino. The library RobotIRremote has similar definitions to IRremote and causes errors.

    That bolded bit is completely vague and could refer to many different places. The description in the line below it does a good job of describing where the "libraries directory" actually is but the description is not on the line where it is needed.

    I think when they say

    1. Move the "IRremote" folder that has been extracted to your libraries directory.

    they actually mean

    1. Move the "IRremote" folder that has been extracted to Arduino_Root/libraries/IRremote where Arduino_Root refers to the install directory of Arduino.