#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
// For the Adafruit shield, these are the default.
#define TFT_DC 4
#define TFT_CS 5
// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
void setup() {
tft.begin();
tft.setRotation(1);
}
void loop(void) {
//tft.fillScreen(ILI9341_BLACK);
tft.setCursor(0, 0);
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(1);
tft.println("Hello World!");
tft.setTextColor(ILI9341_YELLOW);
tft.setTextSize(2);
tft.println(1234.56);
tft.setTextColor(ILI9341_RED);
tft.setTextSize(3);
tft.println(0xDEADBEEF, HEX);
tft.println();
tft.setTextColor(ILI9341_GREEN);
tft.setTextSize(5);
tft.println("Display");
tft.setTextSize(2);
tft.println("Percobaan display TFT,");
tft.setTextSize(1);
tft.println("untuk menampilkan data.");
}