Sylaina/oled-display

Issue with the code

5Volts opened this issue · 8 comments

So I tried to use my 128x64 I2C OLED with an Arduino and it worked without a problem. I really wanted to use pure C code so I came across your library. I tried running it on my ATMEGA328P but this is what I got.
image

Wich controller have you configured in lcd.h (line 61)? It looks like configured for SH1106 controller/display (default when you download library from github) and you use a SSD1306 controller/display.

Yes I am indeed using a SSD1306. What are the things that I need to change in that header file so that it works on the SSD1306 controller?

You have to replace "#define SH1106" by "#define SSD1306" in lcd.h (line 61 in actual version that updated today)

It worked now. Another thing I have to change is the LCD_I2C_ADR to 0x78 so that it get directed to the 0X3C address. Thanks for the help!
image

Maybe this issue could be in a FAQ? This is not obvious by reading the example...

Maybe this issue could be in a FAQ? This is not obvious by reading the example...

Ähm...why not clear from TODOs in header-file of lcd-library? All TODOs in the header files tells you, what you have to do for running display. Your prefered IDE should show you all TODOs.

Had the same Issue... I tried different Controllers etc...and now after 4 hours, I read your Issue.
Should really be in the description of the Lib. Overall its pretty nice an working well now.

PS: You could add the defined(AVR_ATmega32)|| to your lib, cause its working well and has the same registers.