#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#define TFT_DC 9
#define TFT_CS 10
Adafruit_ILI9341 tft = Adafruit_ILI9341 ( TFT_CS, TFT_DC );
unsigned long
T = 0,
T0 = 0
;
void setup ()
{
tft.begin();
tft.setCursor ( 80, 120 );
tft.setTextColor ( ILI9341_WHITE );
tft.setTextSize ( 4 );
tft.println ( T );
tft.setCursor ( 80, 200 );
tft.setTextColor ( ILI9341_WHITE );
tft.setTextSize ( 4 );
tft.println ( T0 );
}
void loop ()
{
T = millis ();
if ( T > 8192 ) delay ( 128 ); else delay ( 1024 );
tft.setCursor ( 80, 120 );
tft.setTextColor ( ILI9341_WHITE );
tft.setTextSize ( 4 );
tft.println ( T );
// magic
tft.setCursor ( 80, 200 );
tft.setTextColor ( ILI9341_BLACK );
tft.setTextSize ( 4 );
tft.println ( T0 );
tft.setCursor ( 80, 200 );
tft.setTextColor ( ILI9341_WHITE );
tft.setTextSize ( 4 );
tft.println ( T );
T0 = T;
}