Proper ways to program ILI9341

neroroxxx

Well-known member
Hi all, i'm not sure if this has been asked before but i'm building a little midi monitor that has a ILI9341, the ILI9341 acts as a sort of serial monitor where it logs every incoming/outgoing MIDI Messages.

For the most part I already have all the code done but my code makes use of .fillScreen() and .fillRect() to draw black areas where text will be drawn, basically if i want to update a line of text i always have to fill a black rectangle over that line where that text will be, otherwise it will look like a complete mess.

The issue with that method is that you see a bit of flash, first you turn the screen black then you draw over it.

so i'm wondering is this the proper way to do this? how do you handle updating the same line of text (or multiple ones) without seeing that flash when the screen is wiped then drawn?

I'm using a T4.0 with ILI9341_t3.h library (i'm assuming this is the optimized version?)
 
You can set the text background color,

Code:
tft.setTextColor(text_color, background_color);
Your new (updated) text will need to be at least as long as the old text.
 
You can use the ILI9341_t3n library with DMA, and use the setClipRect function to clear the areas that need to be rewritten on the display.
 
Back
Top