Skip to content
Discussion options

You must be logged in to vote

Seems to work for me, here is the test code:


#include <TFT_eSPI.h>                 // Include the graphics library (this includes the sprite functions)

TFT_eSPI    tft = TFT_eSPI();         // Declare object "tft"

TFT_eSprite spr = TFT_eSprite(&tft);  // Declare Sprite object "spr" with pointer to "tft" object

void drawSlide(int32_t x, int32_t y, int32_t vol, TFT_eSprite bar, bool flag_refresh = true);

void setup()
{
  // Initialise the TFT registers
  tft.init();

  // Clear the TFT screen to blue
  tft.fillScreen(TFT_BLUE);

  while (1) {
    for (int vol = 0; vol < 100; vol++) {
      drawSlide(0, 0, vol, spr);
      delay(50);
    }
  }
}

void loop(void)
{

}

void drawSlide(int…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@Bodmer
Comment options

@ht93
Comment options

Answer selected by ht93
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants