Skip to content

SSD1306 OLED display coordinates are offset #634

@Len42

Description

@Len42

I'm using a 128x32 pixel SSD1306 SPI OLED display connected to a Daisy Seed, using daisy::OledDisplay<daisy::SSD130x4WireSpi128x32Driver>. Whenever I display anything, it is offset 32 pixels in the X direction. For example, this code:

display.Fill(false);
display.SetCursor(0,0);
display.WriteString("abcdefghijklmnop", true);
display.Update();

displays this:
OLED-bug

The letter "a" should appear at (0,0) but it shows up near the middle of the alphabet.

I tracked the problem to this line of code in libDaisy:

case 32: high_column_addr = 0x12; break;

If I delete that line, the display works fine:
OLED-ok

But it looks like that line of code was specifically added for 32-pixel-high displays, so I suspect that simply deleting it isn't the correct solution. Maybe different SSD1306 modules aren't perfectly compatible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions