9 years, 11 months ago.

Nucleo + OLED + Adafruit_GFX_I2C

Hi Guys,

this time, I tried bring to live OLED display module with Adafruit_GFX_I2C library. Again without success. Can somebody help me? Probably I'm doing some simple mistake. This is how my Nucleo F401RE is connected to OLED display. /media/uploads/vrabec/img_6812.jpg

And this is piece of code I'm try to run:

#include "mbed.h"
#include "Adafruit_SSD1306.h"

DigitalOut myLed(LED1);
I2C i2c(I2C_SDA, I2C_SCL);
Adafruit_SSD1306 oled (i2c, D4);

int main() {
    int tickTime = 1000;
    oled.begin(SSD1306_EXTERNALVCC);
    wait_ms(200);
    oled.display();
    wait(2);
    while(1) {
        myLed = !myLed;
        wait_ms(tickTime);
    }
}

Adafruit_SSD1306.h is configured to support I2C and display with resolution 128x64:

#define SSD1306_128_64
//#define SSD1306_128_32

//#define IS_SPI
#define IS_I2C

Please help me. I already spend quite a lot time with this issue :(

I found solution by myself :). 1.) I don't need pull-up resistors for I2C in this setup, because OLED display already has it. 2.) don't setup I2C frequency and start() method. (After commenting out this stuff, display starts working).

posted by Michal Stehlik 01 Jun 2014

Great! EnjoY

posted by Martin Kojtal 02 Jun 2014

1 Answer

5 years, 10 months ago.

Hi there,

Glad you were able to resolve your issue!

- Jenny, team Mbed


Assigned to Jenny Plunkett 5 years, 10 months ago.

This means that the question has been accepted and is being worked on.