OLED MIDI Display

Following on from my experiments with colour TFT displays, this project takes a cheap monochrome OLED display and puts it to use with MIDI.

  • In Part 2 I almost manage to get two displays working!

Warning! I strongly recommend using an old or second hand keyboard for your MIDI experiments.  I am not responsible for any damage to expensive instruments!

These are the key Arduino tutorials for the main concepts used in this project:

If you are new to Arduino, see the Getting Started pages.

Parts list

  • Arduino Uno
  • 0.9″ I2C OLED Display based on the SSD1306
  • A MIDI receive module (see: Arduino MIDI Interfaces)
  • Breadboard and jumper wires

The Circuit

OLEDMIDIDisplay_bb

These displays have four connections – GND – VCC – SCL – SDA.  Although some variants have GND and VCC swapped so be sure to check the wiring on your own display.

There are also some similar displays that include a lot more pins.  This is because the SSD1306 driver chip can actually do either SPI or I2C and sometimes both sets of pins are present.  My display only does I2C so this project is assuming you have one of the four-pin I2C displays similar to the one shown above.

To hook it up to MIDI, use the usual 5V-GND-RX links to some kind of MIDI receive module.

The Code

I’ve taken the code from the TFT MIDI Display and updated it to use the Adafruit SSD1306 library instead.  There are a few minor differences between the monochrome OLEDs and the colour TFT as follows.

  • As stated the OLED is monochrome so only deals in SSD1603_BLACK or SSD1603_WHITE for colours.
  • By default the OLED is white on black.
  • The resolution is 128×64 (compared to the TFT’s 160×128).
  • The “rotation” options are slightly different (for details, see the code).
  • Updating the TFT display is “instant” but the OLED won’t update until the .display() function is called.
  • The TFT is an SPI device whereas the OLED is I2C.  As mentioned above the SSD1306 can act as either an SPI or I2C device and there are allowances in the libraries for modules that can do either but I’m only considering I2C here.

The basic principles of using the Adafruit GFX library are the same though – you can plot pixels, draw shapes, apply a bitmap or print() characters on the screen so the majority of my existing code works fine when carried over to the OLED display.

Find it on GitHub here.

Closing Thoughts

Here is a photo of it in use with my USBMIDI to MIDI Shield.

2020-10-30 11.30.19

It is possible to choose one of two I2C addresses for these displays via a hardware jumper on the rear of the board so it would be neat to build a simple dual-display shield to allow for more variety in the visualisations.

In principle I should also be able to implement my midi note display, but I’ll have to do some playing around with the size of the bitmaps first.

Obviously these displays aren’t as fancy as the colour TFT displays but they still look quite neat and are cheap and small and available very easily.  They are also readily available in a range of shield formats for other boards so I might look into that too.

Kevin

Leave a comment