Optimize re-drawing the ili9341 screen in my code

What i'm trying to achieve. I'm trying to achieve a basic "terminal". Basically - I want to draw a buffer (which is 1024 in size) and add to it when i press a button. What's my issue? My issue is, that the way i "clear" the screen is not really well optimized. It's heavy on my poor esp8266 - this is what I'm doing.
for (int j = 0; j < strlen(buffer); j++) {
tft.print(' ');
}
for (int j = 0; j < strlen(buffer); j++) {
tft.print(' ');
}
I'm looking for suggestions on how could i improve this.
No description
6 Replies
kendelburry
kendelburryOP3mo ago
Full code:
DarwinWasWrong
DarwinWasWrong3mo ago
A little confused. You want a block of text, 1024 in length and draw on screen then if you use KB - you add to the block >? or the text replaces part of the block or the text is added to the from of the block/or the end and the text scrolls @dumbaspiss
kendelburry
kendelburryOP3mo ago
Yep, i add to the block. Then i redraw my screen.
DarwinWasWrong
DarwinWasWrong3mo ago
You need to show operation The block is fixed size, if you add it is either scroll left, right or replace I will assume you have abandoned the question @dumbaspiss
kendelburry
kendelburryOP3mo ago
Nope, working on it.

Did you find this page helpful?