Compatibility with atmega32U4 (Arduino micro)
For atmega32U4-boards USBDevice.init(); must not be called. This is only necessary for SAMD-boards. With this patch the library works fine with an arduino micro board.
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
int main(void) {
|
||||
init();
|
||||
#if defined(USBCON)
|
||||
USBDevice.init();
|
||||
#if defined(ARDUINO_ARCH_SAMD)
|
||||
USBDevice.init();
|
||||
#endif
|
||||
USBDevice.attach();
|
||||
#endif
|
||||
_begin(); // Startup MySensors library
|
||||
|
||||
Reference in New Issue
Block a user