#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#include "point.h"
//<ch Maachiraju,40038280> 
#define TFT_DC 2
#define TFT_CS 15
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
 
 
void setup() {
  tft.begin();
  tft.setRotation(1);
 
  tft.setTextColor(ILI9341_WHITE);
  tft.setTextSize(2);
}
void draw_points(Point& P1, Point& P2){
  tft.drawLine(
    P1.get_x(),P1.get_y(),
    P2.get_x(),P2.get_y(),
    ILI9341_WHITE);
  }
 
void loop() {
  Point P1(40,0);
  Point P2(40,40);
  Point P3(80,40);
  Point P4(80,0);
  tft.setCursor(0,0);
  draw_points(P1,P2);
  delay(1000);
  draw_points(P2,P3);
  delay(1000);
  draw_points(P3,P4);
  delay(1000);
  draw_points(P4,P1);
  delay(1000);
  
  
  
  tft.fillScreen(ILI9341_BLACK);
  delay(1000);
}