Hello, this is my first topic on this forum ![]()
Hardware: ESP8266 (nodeMCU 1.0 ESP-12F) (e-paper esp8266 driver board from waveshare)
E-ink: 7.5 inch, 3 colored, 640x384px
What I want to achieve:
I want download text from json and print it on display. For simplified version I use array of chars, i try iterate over it and display this text with small margin on right side.
What's is a problem:
Text is displayed but its shuttered. Preview image is attached.
Code used to display it:
void drawPage1()
{
 int mUp = 90;
 Serial.println("drawPage1 - start");
 const char pl[] = "Lorem Ipsum";
 const char* l[] = {"Lorem ipsum dolor sit amet, consectetur adipiscing elit,\n",
          "in reprehenderit in voluptate velit esse cillum dolore eunon \n",
          "fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n",
          "proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n",
          "proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n"
          };
 display.setTextColor(GxEPD_WHITE);
 display.setRotation(0);
 display.setFullWindow();;
 display.firstPage();
 int16_t tbx, tby; uint16_t tbw, tbh;
 display.setFont(&FreeSansBold12pt7b);
 display.getTextBounds(pl, 0, 0, &tbx, &tby, &tbw, &tbh);
 do
 {
  display.fillScreen(GxEPD_WHITE);
  display.fillRect(display.width() - tbw - 60, 20, tbw + 40, 40, GxEPD_BLACK);
  display.drawLine(20, 60, display.width() - 20, 60, GxEPD_BLACK);
  display.setFont(&FreeSansBold12pt7b);
  display.setCursor(display.width() - tbw - 40, 20 + FreeSansBold12pt7b.yAdvance);
  display.setTextWrap(1);
  display.setTextColor(GxEPD_WHITE);
  display.print(pl);
  for ( int i = 0; i < sizeof(l) / sizeof(char *); i++ )
  {
   if (i != 0) {
    mUp = display.getCursorY();
   }
   display.setFont(&FreeSans9pt7b);
   display.setTextColor(GxEPD_BLACK);
   display.setCursor(20, mUp);
   display.print(l[i]);
   Serial.print(l[i]);
  }
 }
 while (display.nextPage());
 Serial.println(display.getCursorY());
 Serial.println("drawPage1 - done");
}
How should i properly do this ?
