#include <SPI.h>
#include <UTFT.h>
#include <SPIflash.h>
#include <UTFT_SPIflash.h>
extern uint8_t SmallFont[];
extern uint8_t BigFont[];
UTFT myGLCD (CTE70, 38, 39, 40, 41);
SPIflash myFlash(45);
UTFT_SPIflash myFiles(&myGLCD, &myFlash);
void setup() {
myGLCD.InitLCD(LANDSCAPE);
myGLCD.setBright(7);
myGLCD.setFont(BigFont);
myGLCD.setColor(255, 255, 255);
myGLCD.setBackColor(0, 0, 0);
myGLCD.clrScr();
myFlash.begin();
if (myFlash.ID_device == 0)
{
myGLCD.print(F("Unknown flash device!"), 10, 10);
while (true) {};
}
TestIcon2Display(10, 10);
}
void TestIcon2Display(int x, int y)
{
for (int i = 0; i < 44; i++)
{
Serial.println(i);
myFiles.loadBitmap(i, x, y);
x = x + 150;
if (x > 800 - 150)
{
x = 10;
y = y + 110;
}
if (y > 480 - 110) y = 10;
delay(700);
}
}
void loop() {
}