lcdgfx icon indicating copy to clipboard operation
lcdgfx copied to clipboard

DisplaySH1106_128x64_I2C constructor with custom arguments

Open LoneRetrievr opened this issue 3 years ago • 2 comments

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

LoneRetrievr avatar Mar 11 '22 23:03 LoneRetrievr

Hi.

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

lexus2k avatar Mar 13 '22 01:03 lexus2k

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)

LoneRetrievr avatar Mar 13 '22 09:03 LoneRetrievr