#include <SPI.h>
#include <Adafruit_ILI9341.h>
#include <Adafruit_GFX.h>
//#define TFT_CS 8 // TFT CS pin is connected to arduino pin 8
//#define TFT_RST 9 // TFT RST pin is connected to arduino pin 9
//#define TFT_DC 10 // TFT DC pin is connected to arduino pin 10
#define TFT_CS 10 // TFT CS pin is connected to arduino pin 8
#define TFT_RST -1 // TFT RST pin is connected to arduino pin 9
#define TFT_DC 9 // TFT DC pin is connected to arduino pin 10
// initialize ILI9341 TFT library
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
//Adafruit_ILI9341 display = Adafruit_ILI9341(&spi0);
void setup() {
// put your setup code here, to run once:
}
void testFillScreen() {
//unsigned long start = micros();
delay(100);
tft.fillScreen(ILI9341_BLACK);
delay(100);
tft.fillScreen(ILI9341_RED);
delay(100);
tft.fillScreen(ILI9341_GREEN);
delay(100);
tft.fillScreen(ILI9341_BLUE);
delay(100);
tft.fillScreen(ILI9341_BLACK);
//return micros() - start;
}
void loop() {
// put your main code here, to run repeatedly:
testFillScreen();
}