Hi there!
I want to create a pretty drawing intensive application and need high display refresh rates of my little SSD1306 oled.
At the moment Im trying different constructors of the u8g2lib and some of them do not seem to work properly.
-
U8G2_SSD1306_128X64_NONAME_F_SW_I2C
----> Extremly slow, draws everything fine -
U8G2_SSD1306_128X64_NONAME_F_HW_I2C
----> Slow, draws everything fine -
U8G2_SSD1306_128X64_NONAME_1_HW_I2C
----> YAY! Super fast, BUT draws only the lower 8 horizontal pixels?!!?
I really want (3) to work as it seems to very fast but it draws only the little portion of the lower screen.
My code (simplified) for displaying animation:
unsinged long lastFrame = 0;
int frameRate = 40; //25fps
void draw()
{
if(millis()-lastFrame >= frameRate)
{
lastFrame = millis();
u8g2->clearBuffer();
drawLine();
u8g2->sendBuffer();
}
}
void drawLine()
{
yPos += 1;
u8g2->drawLine(0,yPos,15,32);
if(yPos > 64)
{
yPos = 0;
}
}
Thanks in advance!