0
votes

I am trying to use the Arduino library Scheduler.h. I copied the code from here <1> and I imported the libary, but it didn't compile. Here the compilation error code.

Error:

Arduino: 1.6.9 (Linux), Placa:"Arduino Nano, ATmega328"

AVISO: a biblioteca Scheduler alega rodar em arquitetura(s) [sam e pode ser incompatível com sua placa atual, que roda em arquitetura(s) samd]. /tmp/ccAyeLMX.s: Assembler messages: /tmp/ccAyeLMX.s:588: Error: constant value required lto-wrapper: /home/ullisses/.arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/avr-gcc returned 1 exit status /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 failed collect2: error: ld returned 1 exit status exit status 1 Erro compilando para a placa Arduino Nano

Please, how can I fix this?

1

1 Answers

0
votes

As indicated by the warning message, the Scheduler library is written for SAM and SAMD architecture. The Arduino Nano you're attempting to compile for is AVR architecture so you can't use the library for that board. If you read the page you got the code from you will notice it says:

Hardware Required

  • Arduino Due Board

I recommend studying File > Examples > 02.Digital > BlinkWithoutDelay and the tutorial page for that example, which demonstrates a more sensible method for achieving multiple blinks on AVR.