• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

SSD1306 OLED problems

Q&A Forum › Category: ESP32 › SSD1306 OLED problems
-1 Vote Up Vote Down
Sergio Barreto asked 6 years ago

Hi Rui, I received SSD 1306 OLED screen a few days ago, when connecting it to ESP32 with Lora receiver Sketch, it does not work, you see the blank screen and the output by serial monitor is constantly reset. I tried with Sketch example of Adafruit and if it works. When comparing both Sketch the only difference are the following lines of code:
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
Adafruit_SSD1306 display (SCREEN_WIDTH, SCREEN_HEIGHT, & Wire, OLED_RESET);
Copy the lines in Sketch Lora receiver and the SSD 1306 works.
I have read on GitHub that the version of the Adafruit library in November introduces significant changes. https://github.com/adafruit/Adafruit_SSD1306
In principle the old Sketch continue to work with the new library.
I can not understand what the problem is. Possible incompatibility of the SSD 1306 received ?.
Greetings.

Question Tags: SSD1306 problems
6 Answers
0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

Thanks for the heads up Sergio! This weekend I’ll be double-checking that problem to see if the new update those lines are required. I’ll let you know once I test the new version and see the results.
Regards,
Rui

0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

Hello, I’ve just tried it myself today with the latest version of the Adafruit OLED Library and it compiles perfectly for me (the code that I have in the course). Are you using the same display as me?

0 Vote Up Vote Down
Sergio Barreto answered 6 years ago

Hi Rui, I think my SSD1306 is not compatible with previous libraries. In the Sketch with this device I will have to include the lines:
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
Adafruit_SSD1306 display (SCREEN_WIDTH, SCREEN_HEIGHT, & Wire, OLED_RESET);
Features according to seller:
0.96″ I2C IIC Serial 128X64 128*64 White OLED LCD LED Display Module for Arduino
Description:
128*64 LED display module for Arduino, supports many control chip.
Fully compatible with Arduino, 51 Series, MSP430 Series, STM32 / 2, CSR IC, etc.
Ultra-low power consumption: full screen lit 0.08W
Super high brightness and contrast are adjustable
With embedded driver/controller
Interface type is IIC
Pin Definition: GND, VCC ,SCL, SDA
Pins: 4 pins
Voltage: 3V ~ 5V DC
Working Temperature: -30 ℃ ~ 70 ℃
Character Colors: White(as pictures show)
Drive Duty: 1/64 Duty
High resolution: 128 * 64
Panel Dimensions: 26.70* 19.26* 1.85mm/1.03*0.76*0.07 inch(approx)
Active Area: 21.74* 11.2mm /0.86*0.44 inch(approx)
Driver IC: SSD1306
This is my SSD1306


 
 
 
 

0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

Thanks for letting me know and for sharing your display! I’m not sure why it wouldn’t work without those lines. Can you tell me the exact error that it prints when you don’t add those lines?
Anyway, thanks for sharing your experience. If anyone has the same problem, I’ll point them to this discussion!

0 Vote Up Vote Down
Sergio Barreto answered 6 years ago

Hi Rui, I attached a video of the bug in my ssd1306. Have you tried the difine screen lines in your ssd1306 ?, I have seen that playing with the WIDTH and HEIGHT 128/64 or 128/32 values can change the screen resolution. It can also be played with display.setTextSize (1); or 2, to change size text according to the chosen resolution. I attach photos of different options in my ssd1306.
Saludos.

https://i.imgur.com/bkDrn7h.mp4

Photo of errors in monitor series

With WIDTH and HEIGHT 128/64 and display.setTextSize (1)

With WIDTH and HEIGHT 128/64 and display.setTextSize (2)

With WIDTH and HEIGHT 128/32 and display.setTextSize (1)

0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

Actually I’ve never tried those resolutions parameters, because it worked just fine straight way. I also increased the font size before, but never changed the height/width. I think I have the same OLED, but I don’t have that error… Not sure what’s missing and why that happens with your setup.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.