C++:
#include <NecDecoder.h>
#include <EasyHID.h>
NecDecoder ir;
void setup() {
attachInterrupt(1, irIsr, FALLING);
HID.begin();
}
void irIsr() {
ir.tick();
}
void loop() {
HID.tick();
}
Arduino: 1.8.19 (Windows 10), Плата:"Arduino Nano, ATmega328P (Old Bootloader)"
C:\Users\User\Documents\Arduino\libraries\EasyHID-main\HIDPrivate.c: In function 'usbFunctionSetup':
C:\Users\User\Documents\Arduino\libraries\EasyHID-main\HIDPrivate.c:139:19: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
usbMsgPtr = &idle_rate; // send data starting from this byte
^
C:\Users\User\Documents\Arduino\libraries\EasyHID-main\HIDPrivate.c:145:19: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
usbMsgPtr = &protocol_version; // send data starting from this byte
^
C:\Users\User\Documents\Arduino\libraries\EasyHID-main\HIDPrivate.c:151:19: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
usbMsgPtr = (uint8_t*)&report_buffer; // send the report data
^
WInterrupts.c.o (symbol from plugin): In function `attachInterrupt':
(.text+0x0): multiple definition of `__vector_1'
libraries\EasyHID-main\usbdrvasm_includer.S.o:C:\Users\Murat\Documents\Arduino\libraries\EasyHID-main\usbdrv/usbdrvasm16.inc:35: first defined here
C:\Users\User\AppData\Local\Temp\ccBy1LGa.ltrans0.ltrans.o: In function `__vector_1':
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/WInterrupts.c:372: multiple definition of `__vector_1'
libraries\EasyHID-main\usbdrvasm_includer.S.o:C:\Users\Murat\Documents\Arduino\libraries\EasyHID-main\usbdrv/usbdrvasm16.inc:35: first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Ошибка компиляции для платы Arduino Nano.
p.s я новичок
Изменено: