AndrewFromMelbourne / libSSD1306

Linux C++ library to drive an SSD1306 128x64 Oled display with I2C interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

clear/update display before turn on?

BillPlunkett opened this issue · comments

Is anyone else is out there observing a short period after power up & initialization during which the display has random pixels set? Below is a fix for that (also need to remove const qualifier from init function).

// These seemed to be missing from the init sequence.
// We were seeing a brief 'starfield' on the display without them,
// presumably because the display ram isn't cleared by h/w reset
clear();
displayUpdate();

// Display On - AFh

sendCommand(OLED_SET_DISPLAY_ON);