Datasheet
and change it to:
and make sure that the configuration section where you choose which type of display, looks like this
That is, we'll be using I2C 128x64 display!
Speeding Up the Display
For the best performance, especially if you are doing fast animations, you'll want to tweak the I2C core to run at 1MHz.
By default it may be 100KHz or 400KHz
To do this edit the config with sudo nano /boot/config.txt
and add to the end of the file
dtparam=i2c_baudrate=1000000
# Raspberry Pi pin configuration:
RST = 24
# Raspberry Pi pin configuration:
RST = None # PiOLED does not require reset pin
# 128x32 display with hardware I2C:
#disp = Adafruit_SSD1306.SSD1306_128_32(rst=RST)
# 128x64 display with hardware I2C:
disp = Adafruit_SSD1306.SSD1306_128_64(rst=RST)
# 128x32 display with hardware SPI:
# disp = Adafruit_SSD1306.SSD1306_128_32(rst=RST, dc=DC, spi=SPI.SpiDev(SPI_POR$
# 128x64 display with hardware SPI:
# disp = Adafruit_SSD1306.SSD1306_128_64(rst=RST, dc=DC, spi=SPI.SpiDev(SPI_POR$
© Adafruit Industries https://learn.adafruit.com/adafruit-128x64-oled-bonnet-for-raspberry-pi Page 12 of 15