0

Horizontal Scrolling On 3.5" TFT using HX8357
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Horizontal Scrolling On 3.5" TFT using HX8357

by RedDragon76 on Sat Dec 02, 2017 10:36 pm

Hello!

I am attempting a horizontal auto scroll on the 3.5" TFT.

The issue I am having is that I can move text across the screen by starting at the 480 pixel point and then decrementing it. Once I hit 0 though, I cannot scroll the message any further. Is there a way to get the message to then scroll off of the screen?

Example Code:

void lcd_victory(){
tft.fillScreen(HX8357_BLACK);
tft.setCursor(0,0);
String welcome_text = "GREAT JOB! ";
String welcome_text2 = " YOU DID IT! ";
const int width = 12;
int set_across = 480;
tft.setRotation(3);
tft.fillScreen(HX8357_BLACK);
tft.setTextColor(HX8357_CYAN, HX8357_BLACK);
tft.setTextWrap(false);

for (int offset = 0; offset < set_across; offset++){
set_across = set_across - offset;
tft.setTextSize(8);
tft.setCursor(set_across,80);
tft.println(welcome_text);
tft.setTextSize(6);
tft.setCursor(set_across,160);
tft.println(welcome_text2);
delay(250);
}

RedDragon76
 
Posts: 1
Joined: Sat Dec 02, 2017 10:21 pm

Please be positive and constructive with your questions and comments.