Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 6 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.
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 :(
1 Answer
Assigned to
6 years, 6 months ago.This means that the question has been accepted and is being worked on.
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 2014Great! EnjoY
posted by Martin Kojtal 02 Jun 2014