I2C on 8266

I have followed every recommendation I could find to get an OLED working. SCANNER finds the OLED, but I cannot get a display. I've tried u8x8 and u8g2, tried the ADAFRUIT sd1106 library... All to no avail.

What am I missing here?

The display is HiLetgo 1.3" IIC I2C Serial 128x64 SSH1106 OLED from Amazon

Yes, it looks like a SH1106 with address 0x3C

  1. Install U8g2 via the IDE Library Manager.
  2. Connect display to your ESP8266
  3. Load an Example.
  4. Select a suitable constructor.
  5. Run it

If something is wrong, provide the information. e.g. which step. what wiring. which example. which constructor

David.

This is the constrictor:
U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);

All's well when I use a MEGA2360

Thanks for you help

I don't know the MEGA2360

But your constructor looks correct for ESP8266. You need to use the correct hardware SDA, SCL pins on the ESP8266.

Which is why I suggested that you say

what wiring

David.

  1. Typo (I suspect you knew) It's a MEGA2560
  2. I'm connecting to SDL --> D1 and SDA --> D2 on the ESP8266 - It's actually a WEMOS D1R2 Mini

As I pointed out, SCANNER finds it with this setup.

Yes, I suspected it was a typo.

But your mother would have taught you to spell correctly. e.g. SDL

David.

My mother was a programmer. For the record, I am 74. She was hired in 1959 by GE in Lynn, Massachusetts because she had a degree in mathematics. First woman programmer at GE!

I changed SDL to SCL. but it still doesn’t work!

Brush up on your spelling and your arithmetic. Then your SH1106 display will work fine.

It is not difficult to do things correctly.

David.

Well, thanks anyway for your time.

I'm no better off than I was before my post, but it's been fun.