/*
Simple "Hello World" for ILI9341 LCD
https://wokwi.com/arduino/projects/308024602434470466
*/
#include "SPI.h"
#include <Adafruit_GFX.h>
#include "Adafruit_ILI9341.h"
#include "Font.h"
#define TFT_DC 9
#define TFT_CS 10
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
float value1 = 0;
void setup() {
pinMode(A0, INPUT_PULLUP);
tft.begin();
tft.fillScreen(ILI9341_BLACK);
tft.setTextSize(3);
}
void loop() {
value1 = analogRead(A0);
tft.setRotation(1); // โค้ด Rotate ตัวหนังสือ
tft.setCursor(50,50);
tft.setTextColor(ILI9341_GREEN,ILI9341_BLACK);
//tft.setFont(&Lato_Heavy_30);
//tft.fillRect(0, 0 , 100, 80, ILI9341_BLACK);
tft.print(millis()/1000);
delay(1000);
}