/*
Simple "Hello World" for ILI9341 LCD
https://wokwi.com/arduino/projects/308024602434470466
*/
#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#define TFT_DC 9
#define TFT_CS 10
#define BLACK 0x0000
#define BLUE 0x001F
#define RED 0xF800
#define GREEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define YELLOW 0xFFE0
#define WHITE 0xFFFF
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
unsigned int ax = 90; //Aussen xy
unsigned int ay = 5;
unsigned int tmpcolA;
unsigned int hk1x = 15; //Heizkreis 1
unsigned int hk1y = 110; //Heizkreis 1
unsigned int hk1w = 2; //Heizkreis 1
unsigned int hk2x = 15; //Heizkreis 2
unsigned int hk2y = 210; //Heizkreis 2
unsigned int hk2w = 2; //Heizkreis 2
unsigned int sx = 190; //Speicher1 xy
unsigned int sy = 40;
unsigned int sw = 4;
unsigned int solx = 0; //Solar xy
unsigned int soly = 0;
unsigned int ox = 0; //ÖlKessel xy
unsigned int oy = 0;
unsigned int kx = 10; // 19x150 Kamin xy
unsigned int ky = 20;
unsigned int tmpcol1; // TempColor Sens 1
unsigned int tmpcol2; // TempColor Sens 2
unsigned int tmpcol3; // TempColor Sens 3
unsigned int tmpcol4; // TempColor Sens 4
void setup() {
tft.begin();
tft.setRotation(1);
tft.fillScreen(BLACK);
tft.fillRect(kx, ky, 60, 60, WHITE); // Kamin
tft.fillRect(kx+2, ky+2, 56, 56, BLACK); // Kamin
tft.drawCircle(kx+10, ky+10, 2, WHITE); //Sensor zeichen
tft.fillRect(kx-8, ky+22, 40, 30, WHITE); // Kamin-Fenser
tft.fillRect(kx-6, ky+24, 36, 26, BLACK); // Kamin-Fenser
tft.drawRect(kx+32, ky-6, 22, 7, WHITE); // Kamin-Schlot
tft.fillRect(kx+18, ky+5, 35, 15, BLACK); // SchriftFreistellung
tft.setTextColor(WHITE,BLACK);
tft.setTextSize(1);
tft.setCursor(kx+28, ky+8);
tft.println("HOLZ");
//----------- Flame -----------------------------------------
tft.fillCircle (kx+ 9, ky+42, 7, RED); //Feuer zeichen
tft.fillCircle (kx+11, ky+42, 7, RED); //Feuer zeichen
tft.fillCircle (kx+13, ky+42, 7, RED); //Feuer zeichen
tft.fillTriangle(kx- 2, ky+30, kx+2, ky+42, kx+15 , ky+42, RED); //Feuer li zeichen
tft.fillTriangle(kx+5, ky+38, kx+11, ky+26, kx+18, ky+38, RED); //Feuer re zeichen
tft.fillTriangle(kx+ 9, ky+42, kx+20, ky+42, kx+25, ky+30, RED); //Feuer mi zeichen
tft.drawLine (kx+17, ky+36, kx+25, ky+30, YELLOW); //Feuer zeichen
tft.drawLine (kx-2, ky+30, kx+8, ky+38, YELLOW); //Feuer zeichen
tft.fillCircle (kx+13, ky+43, 3, YELLOW); //Feuer zeichen
//-----------------------------------------------------------
//tft.fillRect(kx-6, ky+24, 36, 26, BLACK); // Flame Abdeckung
//tft.drawRect(0, 0, 66, 66, GREEN);
}
void loop() { }