Arduino Zero SAMD21 with OLED SSD1306 or SH1106

Hi

does anyone working with Arduino Zero or any SAMD21 board (sparkfun, adafruit) succeed in interfacing with low cost 0,96" or 1,3" OLED display

in any combination of driver SSD1306 or SH1106
and with any graphic libraries adafruit or u8glib

thanks
Davide

Hi Davide,

I managed to get the Arduino Zero working with the Adafruit monochrome 1.3" OLED display with the SSD1306 driver. I modified the Adafruit library for the SPI port only, (as that's what my project's using), but not I2C. Note that it needs to be used together with Adafruit's GFX library.

I've attached the modified library below:

Adafruit_SSD1306.zip (20.3 KB)

thank you Martin

I will give it a chance...indeed my current HW set up is the "opposite"

1.3" OLED with SH1106 and I2C interface :frowning:

Davide

Hi Davide,

I can't see much in the Adafruit library that would prevent I2C from working. The library just uses Wire for I2C communication.

It could be the SPI portion of library code that's the issue, even if you're using I2C? You could try using the modified library with I2C to see if it works? I managed to get the I2C code to compile.

If it works, you could then use the following code in the Adafruit_SSD1306::begin() function in the "I2C init" section, to increase the I2C speed up to 400kHz:

#ifdef __SAMD21G18A__
  Wire.setClock(400000);
#endif

Ok I will follow your suggestions but first I have to source an OLED module with SSD1306

I don' think that adafruit graphic library support the SH1106 driver

Davide

I am using Arduino Zero with a cheap ST7565 Display with no problem.

It is not exaclty an OLED Display, but it is also graphic display with a 128x64 pixels resolution .

I have used the Adafruit ST7565 library and the u8gl library also, both of them worked using a Software SPI (emulated) connection between the Zero and the Display.