我正在 Mac 上工作
来自 JS 且几乎完全是 Web 开发,我不知道这里发生了什么。
我将硬件编程作为一种爱好,并且很容易掌握基础知识。然而,我最近开始了一个涉及红外接收器的项目,需要安装 IRremote图书馆。
我已按照安装说明将下载的“IRremote”文件夹移动到库目录中。
当我运行提供的示例测试代码时
#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);
}
每次都会出现错误没有这样的文件或目录
。
这可能是我问过的最明显的问题,但对于此类问题我是个初学者。谢谢!
最佳答案
说明位于 https://github.com/z3t0/Arduino-IRremote说(强调是我的):
Installation
- Navigate to the Releases page.
- Download the latest release.
- Extract the zip file
- Move the "IRremote" folder that has been extracted to your libraries directory.
- 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.
粗体部分完全模糊,可能指代许多不同的地方。下面一行中的描述很好地描述了“库目录”的实际位置,但描述不在需要它的行上。
我认为当他们说
- Move the "IRremote" folder that has been extracted to your libraries directory.
他们实际上的意思
- Move the "IRremote" folder that has been extracted to Arduino_Root/libraries/IRremote where Arduino_Root refers to the install directory of Arduino.
关于c - IRremote.h "no such file or directory",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56781065/