0

I need some information for the TFT screen 2.8 and arduino mega. The screen works very well and displays the data. The small problem I encounter is for the text display, the page is reloading every second and this makes a small black screen every second. I would like to know if it was possible to reload only one part of the screen display?

See in video https://youtu.be/vxSa6xkH0vU

My loop()

void loop(void) {
 tft.fillScreen(BLACK);
 unsigned long start = micros();
 tft.setCursor(0, 0);
 tft.setRotation(3);
 dt = clock.getDateTime();
 clock.forceConversion();
 // Go 
 tft.println();
 tft.setTextColor(GREEN);
 tft.setTextSize(5);
 tft.println("Info");
 tft.println();
 tft.setTextSize(2);
 tft.println(clock.dateFormat("d-m-Y H:i:s", dt)); 
 tft.println();
 tft.setTextSize(2);
 tft.println("Temperature: ");
 tft.println(clock.readTemperature());
 delay(1000); 
}
asked Sep 12, 2017 at 15:21
2
  • 1
    Don't do a fillscreen when you don't need to. Commented Sep 12, 2017 at 15:23
  • @ratchetfreak When i remove fillScreen this generates a dual display :/ Commented Sep 12, 2017 at 15:34

1 Answer 1

1

You can use tft.rect(x,y,width,height) to clear only a portion of the screen. Make sure to set tft.fill before calling it.

answered Sep 12, 2017 at 15:43

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.