WeMosBat Troubles- no I2C?

The WeMosBat pinout has no SDA or SLC pins. ESP32 standard are GPIO 21 and 22.

I’m trying to get the integrated OLED to work, but the example I have is for a previous version.
The factory program was running the OLED, so I know it works.

An I2C scan reveals zero devices.

It’s supposed to BE the SSD 1306. I can code the display, but I guess I’m guessing now.

This is the exanple’s declaration:

#include “SSD1306.h” // alias for `#include “SSD1306Wire.h”’
// Initialize the OLED display using Wire library
SSD1306 display(0x3c, 5, 4);
display.init();

This is what I’m used to, what I wrote in:
Adafruit_SSD1306 display(0x3c, 5, 4);
Wire.begin();
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); //Start the OLED display

Any suggestions?
Any idea what pins the OLED is on?

I find nothing online.

Per

the used Arduino variant in the ESP32 core is pocket_32 which declares

And if I look at the picture provided here the 21 and 22 pins are aceessible via the header.

Also, I don’t see an OLED on that device?

The OLED is not seen.

I repeated with declarations for SDA and SLC at 21 and 22, and 22 and 21. Did the same with 4 and 5, because that’s in the example declaration. And 5 and 4.

This is the I2C scanner, unchanged from Random Nerd:

/*********
  Rui Santos
  Complete project details at https://randomnerdtutorials.com  
*********/

#include <Arduino.h>
#include <Wire.h>

void setup()
{
  Wire.begin();
  Serial.begin(57600);
  Serial.println("\nI2C Scanner");
}

void loop()
{
  byte error, address;
  int nDevices;
  Serial.println("Scanning...");
  nDevices = 0;
  for (address = 1; address < 127; address++)
  {
    Wire.beginTransmission(address);
    error = Wire.endTransmission();
    if (error == 0)
    {
      Serial.print("I2C device found at address 0x");
      if (address < 16)
      {
        Serial.print("0");
      }
      Serial.println(address, HEX);
      nDevices++;
    }
    else if (error == 4)
    {
      Serial.print("Unknow error at address 0x");
      if (address < 16)
      {
        Serial.print("0");
      }
      Serial.println(address, HEX);
    }
  }
  if (nDevices == 0)
  {
    Serial.println("No I2C devices found\n");
  }
  else
  {
    Serial.println("done\n");
  }
  delay(5000);
}

This scanner doesn’t specify any pins.

So does it scan the whole board for an SDA or SCL signal it can recognize?

No, it will scan the I2C bus using the default I2C pins of the variant, aka 21 and 22, not any other pin.

Do you have a link to where you bought the device? I could not see an OLED screen in the above product page.

I got it from AliExpress. There are no attachments. Just photos.

https://aliexpress.ru/item/32905330340.html?spm=a2g0o.productlist.0.0.43957efdmPfoQB&algo_pvid=3deefc3e-e599-4cc3-8b3d-c28bea831999&algo_expid=3deefc3e-e599-4cc3-8b3d-c28bea831999-6&btsid=0b8b15f516205726523605335e31ae&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_

That’s the pinout.

And right there it shows a pinout with the I2C pins…

OLED_SDA = 5 and OLED_SCL = 4.

So per above you were already right

What happens in the scanner sketch when you change

To Wire.begin(5,4);?

Aha! My pinout doesn’t have those yellows.

No I2C devices.