#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#include "icon.h"
#define TFT_DC 9
#define TFT_CS 10
#define BMP_WIDTH 64
#define BMP_HEIGHT 64
int locationx = 0;
int locationy = 0;
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(115200);
tft.begin();
Serial.print("ok!");
}
int bitCount = 0;
int c = 0;
int ds = 0;
void loop() {
tft.drawRGBBitmap(0+bitCount, 0+c+ds, bm_tftbg1, 240, 320);
bitCount+=80;
if(bitCount>=240)
{
bitCount = 0;
c += 80;
}
if(c>=320)
{
c = 0;
}
}