BlokasLabs / USBMIDI

USB MIDI library for Arduino.
Other
189 stars 14 forks source link

Isn't Arduino Nano, ATmega328 supported #1

Closed MicGoMac closed 6 years ago

MicGoMac commented 6 years ago

Hi, My compile error:

Arduino: 1.8.2 (Mac OS X), Board: "Arduino Nano, ATmega328"

In file included from sketch/usbmidi.h:14:0, from sketch/usbmidi.cpp:9: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:235:2: error: #error "Targets with both UART0 and CDC serial not supported"

error "Targets with both UART0 and CDC serial not supported"

^ In file included from /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:233:0, from sketch/usbmidi.h:14, from sketch/usbmidi.cpp:9: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h:152:16: error: conflicting declaration 'Serial Serial' extern Serial Serial; ^ In file included from /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:232:0, from sketch/usbmidi.h:14, from sketch/usbmidi.cpp:9: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h:143:25: note: previous declaration as 'HardwareSerial Serial' extern HardwareSerial Serial; ^ In file included from /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:233:0, from sketch/usbmidi.h:14, from sketch/usbmidi.cpp:9: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h:52:32: error: 'EPTYPE1' was not declared in this scope

define EP_TYPE_BULK_OUT (1<<EPTYPE1)

                            ^

sketch/usbmidi.cpp:159:2: note: in expansion of macro 'EP_TYPE_BULK_OUT' EP_TYPE_BULK_OUT,

^ /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h:51:33: error: 'EPTYPE1' was not declared in this scope

define EP_TYPE_BULK_IN ((1<<EPTYPE1) | (1<<EPDIR))

                             ^

sketch/usbmidi.cpp:160:2: note: in expansion of macro 'EP_TYPE_BULK_IN' EP_TYPE_BULK_IN,

^ /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h:51:48: error: 'EPDIR' was not declared in this scope

define EP_TYPE_BULK_IN ((1<<EPTYPE1) | (1<<EPDIR))

                                            ^

sketch/usbmidi.cpp:160:2: note: in expansion of macro 'EP_TYPE_BULK_IN' EP_TYPE_BULK_IN,

^ exit status 1 Error compiling for board Arduino Nano.

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

gtrainavicius commented 6 years ago

Hey, ATmega328 doesn't have a USB peripheral built in, so it is not supported by Arduino's PluggableUSB library, on which this library is based.

Theoretically it should still be possible to get USB-MIDI on ATmega328 by using software USB library like V-USB (https://www.obdev.at/products/vusb/index.html) but I can't help you with that.