How to get rid of the white line on the right side of my oled?

I recently bought my first oled display, an 1.3 inch IIC 128x64 white oled display module, with a SH1106 chip.

I couldn't get it to work with the adafruit library, so I switched over to the u8g2 library.

It works great, except there is a strange white line on the right side of the screen (see picture)

This is the coding I'm using:

#include <Arduino.h>
#include <SPI.h>
#include <U8g2lib.h>

U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, SCL, SDA, U8X8_PIN_NONE);

void setup(void) {
u8g2.begin();
}

void loop(void) {
u8g2.firstPage();
do {
u8g2.setFont(u8g2_font_unifont_t_symbols);
u8g2.drawUTF8(3, 20, "Snowman: :snowman_with_snow:");
u8g2.drawStr(3,40,"winter");
} while ( u8g2.nextPage() );
delay(1000);
}

How can i get rid of this annoying white line?

I found the solution, I changed the init into:

U8G2_SH1106_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, SCL, SDA, U8X8_PIN_NONE);

:slight_smile:

3 Likes