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.