Hi,
Some time ago I built an Arduino MIDI controller, using the Leonardo, using the Teensy USBMIDI libraries for the ATmega32U4 by installing Georg Werner's TeeOnArdu software. This worked perfectly fine in the Arduino IDE 1.0.6, with the TeeOnArdu version of the 8th of May 2014, and I have been using this software combination ever since.
Now I'm trying to get it work with the Arduino IDE 1.6.x, but without success ... Georg Werner's version was modified to work with the IDE 1.6 line, but now it works on neither the 1.0.6 nor the 1.6.x version.
After reading Spark404's comment, I tried using his version. This works fine in Arduino 1.6.7: the MIDI examples compile without errors, the Leonardo is recognized as a MIDI device in all OSs, and it can send and receive messages.
Success, right? Well, not quite ...
The library I wrote uses the precompiler to determine the board (It uses a completely different approach for MIDI over USB on the Uno, for example) using preprocessor directives like
#if defined(__AVR_ATmega32U4__).
My code relies on the PJRC Rotary Encoder Library as well, and this library uses #elif defined(__AVR_ATmega32U4__) && !defined(CORE_TEENSY) to set the right interrupts for the Leonardo.
In Arduino 1.0.6, this worked, because when compiling for TeeOnArdu (Georg Werner's version from 2014), AVR_ATmega32U4 was defined, and CORE_TEENSY wasn't.
In Arduino 1.6.x however (using Spark404's version of TeeOnArdu), it is the opposite: CORE_TEENSY is set (this is fixed very easily) but more importantly, AVR_ATmega32U4 is not defined, which is a much bigger problem.
Is there a way I can edit the board definitions of TeeOnArdu, so that AVR_ATmega32U4 is defined?
I do not understand what determines which of these defines are set, so if anyone could explain this, or at least point me to a page with the necessary information, that would help a lot.
Thanks in advance!
Pieter
(P.S: The Instructable I wrote last year, using Arduino 1.0.6, can be found here.)