/*
  ESP32 + ILI9341 LCD Basic Example

  https://wokwi.com/projects/325324981270479442
*/

#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"

#define TFT_DC 2
#define TFT_CS 15

// Define some TFT readable colour codes to human readable names
#define BLACK   0x0000
#define DARKBLUE 0x0010
#define VIOLET 0x8888
#define RED     0xF800
#define GREEN   0x07E0
#define CYAN    0x07FF
#define MAGENTA 0xF81F
#define YELLOW  0xFFE0
#define WHITE   0xFFFF
#define GREY   tft.color565(64, 64, 64);
#define GOLD 0xFEA0
#define BROWN 0xA145
#define SILVER 0xC618
#define LIME 0x07E0
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);

int i = 0;
int BLUE = tft.color565(50, 50, 255);

void drawHome()
{

  tft.fillScreen(BLACK);
  tft.drawRoundRect(0, 0, 319, 240, 8, WHITE);     //Page border

  tft.fillRoundRect(60, 180, 200, 40, 8, RED);
  tft.drawRoundRect(60, 180, 200, 40, 8, WHITE);  //Game

  tft.fillRoundRect(60, 130, 200, 40, 8, RED);   //RGB led
  tft.drawRoundRect(60, 130, 200, 40, 8, WHITE);

  tft.fillRoundRect(60, 80, 200, 40, 8, RED);
  tft.drawRoundRect(60, 80, 200, 40, 8, WHITE); //Oscilloscope

  tft.setCursor(20, 20);
  tft.setTextSize(2);
  tft.setFont();
  tft.setTextColor(WHITE);
  tft.print("Welcome to the HydroChef!");
  tft.setCursor(25, 50);
  tft.setTextSize(2);
  tft.setTextColor(LIME);
  tft.print("Please select a function");
  tft.setTextColor(BLACK);
  tft.setCursor(120, 195);
  tft.print("etc");

  tft.setCursor(105, 145);
  tft.print("Coffee");

  tft.setCursor(95, 95);
  tft.print("Pasta Cook");
  //  delay(500);

}

void drawHomeGreen(){
  tft.fillScreen(BLACK);
  tft.drawRoundRect(0, 0, 319, 240, 8, WHITE);     //Page border

  tft.fillRoundRect(60, 180, 200, 40, 8, GREEN);
  tft.drawRoundRect(60, 180, 200, 40, 8, WHITE);  //Game

  tft.fillRoundRect(60, 130, 200, 40, 8, GREEN);   //RGB led
  tft.drawRoundRect(60, 130, 200, 40, 8, WHITE);

  tft.fillRoundRect(60, 80, 200, 40, 8, GREEN);
  tft.drawRoundRect(60, 80, 200, 40, 8, WHITE); //Oscilloscope

  tft.setCursor(20, 20);
  tft.setTextSize(2);
  tft.setFont();
  tft.setTextColor(WHITE);
  tft.print("Welcome to the HydroChef!");
  tft.setCursor(25, 50);
  tft.setTextSize(2);
  tft.setTextColor(LIME);
  tft.print("Please select a function");
  tft.setTextColor(BLACK);
  tft.setCursor(120, 195);
  tft.print("etc");

  tft.setCursor(105, 145);
  tft.print("Coffee");

  tft.setCursor(95, 95);
  tft.print("Pasta Cook");
  //  delay(500);
}

void setup() {
  tft.begin();
  tft.setRotation(1);
  drawHome();
  // delay(2000);
  // drawHomeGreen();
}

void loop() { 
   
}