Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void ScrollText () {
- for (int offset = 0; offset < Text.length(); offset++) {
- String t = "";
- for (int i = 0; i < 8; i++) // 8 = width of the text string in characters on display
- t += Text.charAt((offset + i) % Text.length());
- tft1.setTextWrap(false);
- tft1.setRotation(3);
- tft1.setFont(&FreeSerif9pt7b);
- tft1.setTextSize(1);
- tft1.fillRect(3, 3, 75, 20,BackFill);
- tft1.setTextColor(WHITE);
- tft1.setCursor(3, 20);
- tft1.print(t);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement