lexus2k / lcdgfx

Driver for LCD displays running on Arduino/Avr/ESP32/Linux (including Rasperry) platforms
MIT License
356 stars 51 forks source link

DisplaySH1106_128x64_I2C constructor with custom arguments #82

Open LoneRetrievr opened 2 years ago

LoneRetrievr commented 2 years ago

Hello, I'm trying to use a SH1106 OLED Display on an Arduino, but I can't make it work. My code looks like this : DisplaySH1106_128x64_I2C display(-1, {-1, 0x3C, 12, 13, 0}); The rest of the code is identical to the SH1106 example, but the screen remains black. I have no clue why

lexus2k commented 2 years ago

Hi.

Interesting. If you're using Atmega328p as far as I know, it doesn't allow to use random pins for the hardware I2C.

LoneRetrievr commented 2 years ago

I'm actually using an Arduino Mega with Atmega2560. Maybe adding a Software I2C library could be the solution? I came across this adaptation proposed by the creator of the Software Wire library, but I'm not really sure it would work, because I didn't see any use of Twowire (but I could be totally wrong)