/*
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 px = 10; // 19x150 Kamin xy
unsigned int py = 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(px, py, 60, 60, WHITE); // Pell
tft.fillRect(px+2, py+2, 56, 56, BLACK); // Pell
tft.drawRect(px+32, py-6, 22, 7, WHITE); // Kamin-Schlot
tft.drawCircle(px+10, py+10, 2, WHITE); //Sensor zeichen
tft.fillRect(px+5, py+23, 32, 32, WHITE); // Pell-Kammer
tft.fillRect(px+7, py+25, 28, 28, BLACK); // Pell-Kammer
tft.fillRect(px+24, py+32, 20, 18, WHITE); // Pell-Brenner
tft.fillRect(px+26, py+34, 16, 14, BLACK); // Pell-Brenner
tft.fillRect(px+22, py+30, 13, 14, BLACK); // Pell-Brenner
tft.fillRect(px+38, py+32, 6, 7, BLACK); // FüllRohr Abdeckung
tft.fillRect(px+58, py+16, 2, 11, BLACK); // FüllRohr Abdeckung
tft.drawLine(px+35, py+32, px+64, py+11, WHITE); // FüllRohr
tft.drawLine(px+35, py+33, px+64, py+12, WHITE); // FüllRohr
tft.drawLine(px+35, py+34, px+64, py+13, WHITE); // FüllRohr
tft.drawLine(px+42, py+39, px+64, py+23, WHITE); // FüllRohr
tft.drawLine(px+42, py+40, px+64, py+24, WHITE); // FüllRohr
tft.drawLine(px+42, py+41, px+64, py+25, WHITE); // FüllRohr
tft.fillRect(px+18, py+5, 35, 15, BLACK); // SchriftFreistellung
tft.setTextColor(WHITE,BLACK);
tft.setTextSize(1);
tft.setCursor(px+28, py+8);
tft.println("PELL");
//----------- Flame -----------------------------------------
tft.fillCircle (px+32, py+41, 5, RED); //Feuer zeichen
tft.fillTriangle(px+30, py+38, px+37, py+38, px+25, py+28, RED); //Feuer ob zeichen
tft.fillTriangle(px+26, py+40, px+35, py+38, px+14, py+28, RED); //Feuer mi zeichen
tft.fillTriangle(px+28, py+45, px+35, py+38, px+10, py+35, RED); //Feuer mi zeichen
tft.drawLine (px+10, py+35, px+24, py+38, YELLOW); //Feuer zeichen
tft.drawLine (px+24, py+27, px+28, py+34, YELLOW); //Feuer zeichen
tft.fillCircle (px+33, py+40, 2, YELLOW); //Feuer zeichen
//-----------------------------------------------------------
//-------Flamme Ausblenden------------------
//tft.fillRect(px+7, py+25, 28, 19, BLACK); // Flame Abdeckung
//tft.fillRect(px+26, py+34, 16, 14, BLACK); // Flame Abdeckung
tft.drawRect(px-2, py-8, 69, 70, GREEN); // Green Box
//----------------Priorität / Angefordert--------------------------
tft.drawCircle (px+10, py+10, 4, GREEN);
tft.drawCircle (px+10, py+10, 5, GREEN);
tft.drawCircle (px+10, py+10, 6, GREEN);
tft.drawCircle (px+10, py+10, 7, GREEN);
//--- Störung --------------------------------------
tft.fillRect (px+3,py+23, 41, 32, BLACK); // Flamme_Abdeckung
tft.fillRect (px+12,py+24, 27, 27, RED); // Red Backround
tft.fillTriangle (px+28,py+37,px+40,py+48,px+40,py+24, BLACK); //<
tft.fillTriangle (px+22,py+37,px+10,py+48,px+10,py+24, BLACK); //>
tft.fillTriangle (px+25,py+40,px+13,py+52,px+37,py+52, BLACK); //v
tft.fillTriangle (px+25,py+34,px+13,py+22,px+37,py+22, BLACK); //^
}
void loop() { }