Adafruit 3.5" TFT 320x480 display / flicker issues

Im using this cool tft device but i have some display update or flicker issues.

anyone know how to address?

// this code will continue to overwrite the existing values
tft.setCursor(152, 25);
tft.println(rpm, 0);

// if i store the old value and write it black
// i get nasty flicker--fixing with delay(1000) can't be used

// if I add the black arguement, the display works but only if the same number of digits are displayed
tft.setTextColor(HX8357_YELLOW, HX8357_BLACK);
tft.setCursor(152, 25);
tft.println(rpm, 0);

I fixed the issue. Basically i wrote a small “Format” function to pad the data with spaces. That way the total digit amount is the same, so painting the background black works in all cases.

Code posted should anyone want it.


// pass double for the variable to format, int # of decimals to the left of the decimal, int # decimals
// to the right of the decimal

tft.println(Format(volts, 3, 1));


String Format(double val, int dec, int dig ) {
  int addpad = 0;
  char sbuf[20]; // your call on the size
  String condata = dtostrf(val, dec, dig, sbuf);
  int slen = condata.length();
  for (addpad = 1; addpad <= dec + dig - slen; addpad++){
    condata = " " + condata;
  return (condata);


Would something like this work:

float f = 1.2345634;
String str(f, 3); // <— number of decimals

I don’t like threadjacking, but it seems appropriate here because you’ve solved the issue. Could you elaborate on the specific issue you were having, and why your solution fixed it? I’m having an issue that is potentially similar, but I can’t tell from your description.

I have a 480X320 3.5" MCUFRIEND TFT that is flickering and has colour issues with all onscreen elements, not just text (if that’s how yours is). See the attached screenshot for an example.

The attached image was generated using the below lines. It is supposed to be a set of four coloured squares with the colours as defined below.

#define RED 0xF800
#define GREEN 0x07E0
#define BLUE 0x001F
#define YELLOW 0xFFE0

tft.fillRect(0,0,TFTWIDTH/2,TFTHEIGHT/2,RED); //upper left
tft.fillRect(TFTWIDTH/2,0,TFTWIDTH/2,TFTHEIGHT/2,GREEN); //upper right
tft.fillRect(TFTWIDTH/2,TFTHEIGHT/2,TFTWIDTH/2,TFTHEIGHT/2,BLUE); //lower right
tft.fillRect(0,TFTHEIGHT/2,TFTWIDTH/2,TFTHEIGHT/2,YELLOW); //lower left


Hello Guys !!

First i want to say I am beginner for Arduino coding..i just bought GLCD (480 x 320) from the ebay. That GLCD controlling library is (Controller : ili9488 Test code:ILI9327:) under the item description.. I download that define library and uploaded to my ARDUINO UNO result is pretty ugly.

Display Colors are to much contrast Example (Black color looks like ash ,red = Maroon color Bule look likes light blue) and display every thing as a flip screen size not fit to GLCD screen width and height like below uploaded link.. please some one help me on this i do not understand what to do i was googling more than few weeks but nothing got any luck ,..please help me

Link 01 :-

Link 02:-

thank you
Udana gayan