【问题标题】:Scheduler.h library ArduinoScheduler.h 库 Arduino
【发布时间】:2016-11-01 11:29:22
【问题描述】:

我正在尝试使用 Arduino 库 Scheduler.h。我从这里 1> 复制了代码并导入了库,但它没有编译。这里是编译错误代码。

错误:

Arduino:1.6.9 (Linux),Placa:“Arduino Nano,ATmega328”

AVISO: a biblioteca Scheduler alega rodar em arquitetura(s) [sam e pod ser incompatível com sua placa atual, que roda em arquitetura(s) samd]。 /tmp/ccAyeLMX.s:汇编程序消息: /tmp/ccAyeLMX.s:588:错误:需要常量值 lto-wrapper:/home/ullisses/.arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/avr-gcc 返回 1 退出状态 /home/ullisses/.arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/../lib/gcc/avr/4.9.2/../../。 ./../avr/bin/ld: lto-wrapper 失败 collect2:错误:ld 返回 1 个退出状态 退出状态 1 Erro compilando para a placa Arduino Nano

请问,我该如何解决这个问题?

【问题讨论】:

    标签: arduino


    【解决方案1】:

    如警告消息所示,调度程序库是为 SAM 和 SAMD 架构编写的。您尝试编译的 Arduino Nano 是 AVR 架构,因此您不能使用该板的库。如果您阅读page you got the code from,您会注意到它说:

    需要硬件

    • Arduino 到期董事会

    我建议学习 File > Examples > 02.Digital > BlinkWithoutDelaytutorial page for that example,它展示了在 AVR 上实现多次闪烁的更明智的方法。

    【讨论】:

      猜你喜欢
      • 2015-09-08
      • 1970-01-01
      • 2015-09-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-02
      • 2020-10-27
      相关资源
      最近更新 更多