I am writing to a 128x64 OLED
u8g2.firstPage();
do
{
/* Do Whatever */
} while (u8g2.nextPage());
What is happening with firstPage and nextPage ?
Why do I have a loop?
I am writing to a 128x64 OLED
u8g2.firstPage();
do
{
/* Do Whatever */
} while (u8g2.nextPage());
What is happening with firstPage and nextPage ?
Why do I have a loop?
It is a trick to save RAM. It had been mandatory in u8glib and is now optional in u8g2.
Description is here: tpictureloop · olikraus/u8glib Wiki · GitHub
Oliver
Thanks oliver
olikraus:
It is a trick to save RAM. It had been mandatory in u8glib and is now optional in u8g2.
Does that mean that instead of
u8g2.firstPage();
do
{
/* Do Whatever */
} while (u8g2.nextPage());
I can just write
Do Whatever
olikraus:
Description is here: ...
That appears to be a description of what happens in u8glib. I can't see reference to the situation in u8g2. Is there an equivalent page?
vagulus:
Does that mean that instead ofu8g2.firstPage();
do
{
/* Do Whatever */
} while (u8g2.nextPage());
I can just write
Do Whatever
With u8g2 yes, but (A) you need more RAM, (B) you need to use the F constructor and (C) you need to send the content of the frame buffer to the display with the u8g2.sendBuffer() command. Please have a look at the full buffer examples in the Arduino IDE.
vagulus:
That appears to be a description of what happens in u8glib. I can't see reference to the situation in u8g2. Is there an equivalent page?
I have not yet ported the page from u8glib to u8g2. But it is still the same concept, so the u8glib discription still applies.
Oliver
All too complicated
I'll stick with the old way 8)
Thanks