Skip to content
Discussion options

You must be logged in to vote

loop() will keep cycling around so you need to set a limit on the number of times the sprite is scrolled and drawn. Try this:

void loop() {
  static uint16_t x_shift = 0;
  while (x_shift < 240) {
    slide.pushSprite(-240, 0, TFT_TRANSPARENT);
    slide.scroll(2);
    x_shift += 2;
  }
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@whogate
Comment options

Answer selected by whogate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants