/*
purwarupa3d - loading screen
*/
#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);
void setup() {
tft.begin();
tft.fillScreen(ILI9341_BLACK);
tft.setTextSize(3);
testdrawtext(3, 90, "Loading", ILI9341_GREEN);
for(int i = 0; i <= 240; i++){
tft.drawPixel(i,80,ILI9341_WHITE);
tft.drawPixel(i,81,ILI9341_WHITE);
tft.drawPixel(i,82,ILI9341_WHITE);
tft.drawPixel(i,83,ILI9341_WHITE);
tft.drawPixel(i,84,ILI9341_WHITE);
tft.drawPixel(i,85,ILI9341_WHITE);
delay(100);
}
}
void loop() {
}
void testdrawtext(int wid, int hei, char *text, uint16_t color) {
tft.setCursor(wid, hei);
tft.setTextColor(color);
tft.setTextWrap(true);
tft.print(text);}