The Arduino website says that you can use the MIDIUSB library to make a MIDI instrument using the Arduino Due. Here is the link to the webpage: https://www.arduino.cc/en/Tutorial/MidiDevice
It's on the first line on the webpage. The problem is, every time I go to compile the code it says "#error MIDIUSB can only be used with an USB MCU." and doesn't get any further than that. I have never used a Due before so I might just be doing something wrong, but I really don't understand what it is. Any and all help would be appreciated! Thank you in advance!
Do you have Arduino Due selected in the Tools > Board menu?
Yes, I have Arduino Duemilanove selected (which I assume is the long name for Due although I've never seen it before now) and I have the default processor and programmer selected. Also, I am running a variation of the code attached to that web link, but I don't think that matters because I can't even get it to compile in the first place. And I have tried using both the programming port and the standard USB port and neither worked. And I read that the footprint of the Due is the same as the Mega 2560, so I even tried that as well but it didn't help. I'm about to try updating my Arduino IDE to see if that changes anything.
Yes, I have Arduino Duemilanove selected (which I assume is the long name for Due although I've never seen it before now)
Wrong. That's a completely different board that does not have native USB, thus the problem. You need to install the Arduino SAM Boards package:
- Tools > Board > Boards Manager
- Wait for downloads to complete
- Click on the "Arduino SAM Boards" entry
- Click "Install"
- Wait for installation to complete
- Click "Close"
- Tools > Board > Arduino Due - which of those you should select depends on which USB jack you're using. See the product page for more information.
- Now the code will compile without the error
And I read that the footprint of the Due is the same as the Mega 2560
It has the same header layout but it's completely different architecture.