/*
ESP32 HTTPClient Jokes API Example
https://wokwi.com/projects/342032431249883731
Copyright (C) 2022, Uri Shaked
*/
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#include "point.h"
std::vector<Point> V2;
#define TFT_DC 2
#define TFT_CS 15
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
void setup() {
for(int i = 0; i<10; i++) {
V2.emplace_back(i*25+5,i*20+20);
}
tft.begin();
}
void loop() {
#if 0
int cx = tft.width() / 2;
int cy = tft.height() / 2;
tft.fillScreen(ILI9341_BLACK);
tft.print("Size of Vector = ");
tft.print(V1.size());
tft.drawRect(cx, cy, 50, 50, ILI9341_GREEN);
#endif
tft.fillScreen(ILI9341_BLACK);
for(int index = 0; index < V2.size()-1; index++)
{
tft.drawLine(V2[index].getX(), V2[index].getY(), V2[index+1].getX(), V2[index+1].getY(), ILI9341_GREEN);
delay(15);
}
delay(1000);
}