FortySevenEffects / arduino_midi_library

MIDI for Arduino
MIT License
1.56k stars 253 forks source link

Midi not compatible with adafruit_ssd1306 #179

Open ZheTheBear opened 3 years ago

ZheTheBear commented 3 years ago

Hello, I've noticed that the MIDI.H function: MIDI_CREATE_DEFAULT_INSTANCE() isn't compatible with the function display.begin(SSD1306_SWITCHCAPVCC, 0x3C) from the adafruit_ssd1306 display lcd library. The function display.begin(...) returns 0 which means: "SSD1306 allocation failed" when MIDI_CREATE_DEFAULT_INSTANCE() is called. My guess is that the problem resides in memory allocation (Duh) but couldn't investigate any further.

The solution I found for this was to use a reduced version of the SSD1306 oled display library called SSD1306ascii (It works with both wire and avri2c). Hope this helps anyone willing to mix this two libraries. I didn't know exactly where to put this so if this doesn't belong in issues please move this somewhere else.

mtak commented 3 years ago

I'm encountering the same problem in combination with: