Adjust the resolution of the OLed display

Again and again we are asked how you can change the resolution of the OLed displays. Well, that's dependent on the use of Libary, according to the motto: Many roads lead to the goal. Examples with 128x32 and 128x64 pixels are available in the current version of the Libary.

Before we start a new I2C device, we read the I2C address as always, as it can vary from time to time, and to check whether the controller is functional. We have already described this in previous articles. 

In this example, we use the Adafruit-Libary Adafruit_SSD1306 together with our 0.96 " OLed Display and the example 128x32_i2c

As we can see, the presentation leaves something to be desired. Now we try the 128x64_i2c example and get the following error:

 Let us now adjust the file, as in the E-Book to the display, by changing the entry here:

and the same in the example sketch 128x64 the I2C address, we see a clearly better resolution with actual 128x64 pixels:

And the ad is much better.


Leave a comment

All comments are moderated before being published

Recommended blog posts

  1. Install ESP32 now from the board manager
  2. Lüftersteuerung Raspberry Pi
  3. Arduino IDE - Programmieren für Einsteiger - Teil 1
  4. ESP32 - das Multitalent
  5. OTA - Over the Air - ESP programming via WLAN