GithubHelp home page GithubHelp logo

OLED display Improved about arduinogotchi HOT 5 CLOSED

garyz88 avatar garyz88 commented on June 13, 2024
OLED display Improved

from arduinogotchi.

Comments (5)

NoNamedCat avatar NoNamedCat commented on June 13, 2024

You don't need to call display.nextPage every row

from arduinogotchi.

NoNamedCat avatar NoNamedCat commented on June 13, 2024

Here is the complete function with the inverted screen:

void displayTama() {
  uint8_t j;
  display.firstPage();
#ifdef U8G2_LAYOUT_ROTATE_180
    drawTamaSelection(49);

    for (j = 11; j < LCD_HEIGHT; j++) {
      drawTamaRow(j,j+j+j,2);
    }

    for (j = 5; j <= 10; j++) {
      if (j==5) {
        drawTamaRow(j,j+j+j+1,1);
      } else {
        drawTamaRow(j,j+j+j,2);
      }
    }

    for (j = 0; j <= 5; j++) {
      if (j==5) {
        drawTamaRow(j,j+j+j,1);
      } else {
        drawTamaRow(j,j+j+j,2);
      }    
    }
    display.nextPage();
#else
    for (j = 0; j < LCD_HEIGHT; j++) {
      if (j!=5) drawTamaRow(j,j+j+j,2);
      if (j==5) {
         drawTamaRow(j,j+j+j,1);  
         drawTamaRow(j,j+j+j+1,1);
      }
    }
    drawTamaSelection(49);
    display.nextPage();
#endif  
}

from arduinogotchi.

GaryZ88 avatar GaryZ88 commented on June 13, 2024

The U8g2 SSD1306 library, only provide with 128 bytes display buffer, i.e. It can only buffer 8 rows. That is why we need to call "display.nextPage()" for every 8 rows.

from arduinogotchi.

NoNamedCat avatar NoNamedCat commented on June 13, 2024

With the esp8266 and the Esp32 is not needed. I tested the code in those plataforms and the speed increases.

from arduinogotchi.

GaryZ88 avatar GaryZ88 commented on June 13, 2024

Not a bug

from arduinogotchi.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.