// SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println(F("SSD1306 allocation failed")); }
display.clearDisplay();
display.setTextSize(1); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE); // Draw white text
display.cp437(true); // Use full 256 char 'Code Page 437' font
I'm using a wifi kit32 which has a SSD1306.
I can confirm your flowchart working for my display using 0x78.
SSD1306.jpg (12.24 KiB) Viewed 10279 times
The only things I changed was the pins as my display is built in to the ESP32.
The Baud Select from 100k to 400k as 100k is way too slow.
Interlaced to yes otherwise will cause the display to look wrong.
The font to Calibri 14 since interlaced will make the default font fairly small.
My recommendation is not to use internal weak pull-up resistors.
As there are around 45K it could cause timing issues.
Hardware will not work as well as if you use the values Ben has stated.
My OLED Adafruit own pull-up resistors. I wired an oscilloscope on the I2C signals. No activity on the SDA and SCL. The signals are 3.3V level.
I monitor the COM port and the see a problem on the DEBUG info :
[0;31mE (373) i2c: i2c_param_config(647): i2c clock choice is invalid, please check flag and frequency[0m
[0;31mE (383) i2c: i2c_master_cmd_begin(1166): i2c driver not installed[0m
[0;31mE (383) i2c: i2c_master_cmd_begin(1166): i2c driver not installed[0m
[0;31mE (383) i2c: i2c_master_cmd_begin(1166): i2c driver not installed[0m
......
I tried to change frequency ( 100K , 400K or 1M ) , the problem was the same.
I updated the library and recompile the program. The problem was the same.
I also try to create a simple program to send a message on I2C, the problem is the same.
No activity on the SDA and SCL