Trouble finding display model

Hi, I bought an ESP32 device with an integrated OLED device on amazon to start my journey on IoT.

I managed to upload code to the ESP32 and run the stardard ‘hello world’ message through serial, however I’m getting nowhere using the OLED display with U8g2.

My main problem is that I have no idea of what is the model of the OLED device. Can somebody help me discover what model is it? (purchased here : https://www.amazon.co.uk/gp/product/B0BGY69RCK )

This is a photo of the back of the OLED display. That’s all the ‘numbers’ I’ve been able to find on it. Untitled hosted at ImgBB — ImgBB

Any other means of troubleshoting the problem are welcomed.

Thanks a lot!
Jz

p.s. there’s some code for the u8g2 constructor on the same amazon page, it’s just that it’s not working when using that. The messages are 3 yo, so they maybe have changed the display model.

“0.96-inch 128*64 dot matrix OLED” very much sounds like a SSD1306 though. In fact that is referenced twice in the Amazon page.

The easiest thing to do first is to run the I2C scanner sketch on the I2C bus pins indicated in the pinout (SCL = 15, SDA = 4). If any I2C device, like the OLED, is connected, it will show up with its address.

Can you run this code on it?

#include "Arduino.h"
#include <Wire.h>
static const uint8_t SCL_OLED = 15;
static const uint8_t SDA_OLED = 4;

void setup()
{
	Wire.begin(SDA_OLED, SCL_OLED); //Scan OLED's I2C address via I2C0
}

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.print(address,HEX);
			Serial.println("  !");

			nDevices++;
		}
		else if (error==4)
		{
			Serial.print("Unknown 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);
}

Hi Maximilian, thanks a lot for your answer.

Unfortunately it only prints the scanning message and later No I2C Devices found.
I had to rename the

It’s weird because when I received it 2 days ago, it used the display to print the Heltec logo, unfortunately I haven’t found their source code for the demo anywhere.

It could because the rest pin has not been properly initialized for the OLED to go out of reset. This is on GPIO21.

Can you add this code in setup()?

#define _rst 21
pinMode(_rst,OUTPUT);
digitalWrite(_rst, LOW);
delay(50);
digitalWrite(_rst, HIGH);

The board seems also to be equivalent or very close to a Heltec WiFi32 Kit (https://heltec.org/project/wifi-kit32-v3/). You may be able to use libraries and code from https://github.com/HelTecAutomation/Heltec_ESP32/blob/master/examples/OLED/SSD1306SimpleDemo/SSD1306SimpleDemo.ino.

Hi Maximilian, thanks again for your answer.

Unfortunately adding that code gives me the same results. I’ve wondering if I damaged the device when I unscrewed it to make the photo, although I was extremely careful.

I’m completely new to the hardware part,although I’ve been doing software for decades… Is it possible that the device is not i2c at all? I mean, there ara lots of soldered pins from the OLED display into the board… shouldn’t i2c just require 4 pins?

According to a schematic I found on the heltec website, (link) the OLED I2C may be on pins 17(SDA) and 18(SCL). You could try running a scan with those pins.