#include<Arduino.h>
#include <Adafruit_ILI9341.h>
#include <Adafruit_GFX.h>
#include "graphics.c"
#define _AZ_TOUCH_MOD_BIG_TFT // AZ-Touch MOD with 2.8 inch TFT 320 x 240 px
#define ONE_WIRE_BUS 33 //Data vom Temp.Sensor
/*______Define LCD pins for ArduiTouch _______*/
#define TFT_CS 5
#define TFT_DC 4
#define TFT_MOSI 23
#define TFT_CLK 18
#define TFT_RST 22
#define TFT_MISO 19
#define TFT_LED 15
#define HAVE_TOUCHPAD
#define TOUCH_CS 14
#ifdef _AZ_TOUCH_ESP
// AZ-Touch ESP
#define TOUCH_IRQ 2
#else
// AZ-Touch MOD
#define TOUCH_IRQ 27
#endif
//definitions for text output alignment
#define ALIGNLEFT 0
#define ALIGNCENTER 1
#define ALIGNRIGHT 2
/*____Calibrate TFT LCD_____*/
#define TS_MINX 370
#define TS_MINY 470
#define TS_MAXX 3700
#define TS_MAXY 3600
/*______End of Calibration______*/
#define BLACK 0x0000
#define RED 0xF800
#define GREEN 0x07E0
#define WHITE 0xFFFF
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
tft.begin();
}
void loop() {
tft.fillScreen(ILI9341_BLACK);
tft.setRotation(1); // Landscape orientation, USB at bottom right
tft.setTextSize(3);
tft.setTextColor(ILI9341_WHITE, ILI9341_BLACK);
tft.setCursor(0, 21);
tft.print("Test");
// put your main code here, to run repeatedly:
delay(1000); // this speeds up the simulation
tft.fillScreen(ILI9341_BLACK);
tft.setCursor(0, 21);
tft.print("WiFi");
tft.drawRGBBitmap(220, 20, bmp_WiFi, 32, 32);
delay(1000);
tft.fillScreen(ILI9341_BLACK);
tft.setCursor(0, 21);
tft.print("Setup");
tft.drawRGBBitmap(220, 20, wrench, 24, 24);
delay(1000);
tft.fillScreen(ILI9341_BLACK);
tft.setCursor(0, 21);
tft.print("Back1");
tft.drawRGBBitmap(220, 20, bmp_return, 32, 32);
delay(1000);
tft.fillScreen(ILI9341_BLACK);
tft.setCursor(0, 21);
tft.print("Back2");
tft.drawRGBBitmap(220, 20, bmp_returnx, 32, 32);
delay(1000);
tft.fillScreen(ILI9341_BLACK);
tft.setCursor(0, 21);
tft.print("Pfeil li");
tft.drawBitmap(220, 20, bmp_Pfeil_li_32x32, 32, 32,ILI9341_GREEN);
delay(1000);
tft.fillScreen(ILI9341_BLACK);
tft.setCursor(0, 21);
tft.print("WiFi inv");
tft.drawBitmap(220, 20, bmp_WiFi_inv, 32, 32, ILI9341_BLUE);
delay(1000);
tft.fillScreen(ILI9341_BLACK);
tft.setCursor(0, 21);
tft.print("WiFi inv");
tft.drawBitmap(220, 20, bmp_return_32x32, 32, 32, ILI9341_RED);
delay(1000);
}