Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Proper ways to program ILI9341

  1. #1
    Senior Member
    Join Date
    Jul 2017
    Posts
    101

    Proper ways to program ILI9341

    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?)

  2. #2
    Junior Member
    Join Date
    Nov 2020
    Posts
    6
    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.

  3. #3
    Senior Member
    Join Date
    Jul 2017
    Posts
    101
    works great that way, thanks!

  4. #4
    Senior Member
    Join Date
    Oct 2019
    Posts
    174
    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.

  5. #5
    if you start using custom fonts filling the background will not work, and as you see drawing a rectangle causes a flicker. Try this.

    https://youtu.be/uMqTAoCCCX8

    Kris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •