c - IRremote.h "no such file or directory"

标签 c arduino

我正在 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

  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.

粗体部分完全模糊,可能指代许多不同的地方。下面一行中的描述很好地描述了“库目录”的实际位置,但描述不在需要它的行上。

我认为当他们说

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

他们实际上的意思

  1. 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/

相关文章:

arduino - 当我按下 Enter 键时 PuTTY 会发送什么?

c - 如何注册回调以在 linux 中执行文件更改?

c - 将已排序的链表与头节点合并

C++ 初学者 : expected unqualified-id before 'int'

error-handling - 为什么我不能将草图上传到我的董事会?

android - 使用 Arduino 3.1 的 USB 主机模式

无法在STM32上运行简单除法

c - 字符串变量在 C 中未正确返回

c - C 中的递归下降解析器 - 跳过 epsilon 产生式

arduino - 使用Arduino GSM库打开IComSat GSM板