I set up text output to the screen, it works, but each new line is shifted by a character x+=6. How can you fix it?
char text[] = "Hey Bro!\nI am Console\nOpen source project!";
void frame_3()
{
int sizeText = sizeof(text); int x{}; int y{10};
for(int i = 0, x = 0; i < sizeText, x < (sizeText*6); i++, x+=6)
{
u8g2.setFont(u8g2_font_6x10_tr);
u8g2.setCursor(x, y);
u8g2.print(text[i]);
if (text[i] == '\n')
{
y += 10; x = 0;
}
}
Serial.println(sizeText);
}