相关文章推荐
冷冷的警车  ·  spring batch ...·  4 周前    · 
咆哮的酱肘子  ·  可视化: ...·  8 月前    · 
精明的小刀  ·  CSS currentColor ...·  12 月前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I'm trying to install an IR receiver on an esp-8266 board.

I'm working on Mac OS. Fresh install of Arduino IDE. Already deleted the Java/libraries/RobotIRremote folder before compile any test. I still having the same error.

#include <IRremote.h>
int RECV_PIN = 13;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
  Serial.begin(115200);
  irrecv.enableIRIn(); // Start the receiver
void loop()
  if (irrecv.decode(&results))
     Serial.println(results.value, HEX);
     irrecv.resume(); // Receive the next value
Multiple libraries were found for "IRremote.h"

I presume the issue is not the board, since nothing has been uploaded. The error occurs at the very beginning.

Go under preferences (File => Preferences) and check the "Show Verbose Output During" "Compilation".

This will give you some more information about the warning. It is not an error, since you can have multiple libraries with the same name. The file irremote.h can be inside different folders, but you will get more info only with the verbose mode.

Once you compile, you will get some info like:
- multiple libraries found
- library 1 on path XXXX
- library 2 on path YYYY
- compiler will get library on path XXXX (for example).

I don't think the library on Java/libraries/RobotIRremote is used. There are 2 folders where the Arduino IDE will check for libraries:
- installation folder (libraries that are installed with the Arduino IDE)
- user folder (Users/YOURNAME/Documents/Arduino/libraries)

And then there is also a folder for your board, under windows, this is in the %APPDATA%/../local/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries for example.

If the IDE is taking the right library (probably it does), you can ignore this warning message.

Edit: if you are using IR remote for the ESP, check this library: IRRemoteESP8266

Most likely a conflict with the Robot IR Control library that comes with the Arduino IDE. Arduino doesn't know which one to use. Delete it if you don't need it or change either one of the libraries to remove any naming conflicts.

I've removed the old copy of Arduino IDE, clean up all and install a fresh copy. before I've made any thing, I've deleted the Java/libraries/RobotIRremote. Just to be sure I wont have any problems. On the error I see just the one /Users/iulian/Documents/Arduino/libraries/ that is used. If I remove it I get the not found error. I searched on all the hard drive for a second IRremote.h file and I didn't find any. Any ideas? – I.Victor Oct 28, 2019 at 21:16

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.