Thank you POWER-PILL for a neat project !
If you have a 2.4" CYD kicking around and want to enjoy this cool project too, here is the changes I made...
From Ali Express - ESP32-2432S024R
ASCII_Aquarium_CYD.ino
// ------------------------------ CYD Touch Pins -------------------------------
static const int TOUCH_CLK_PIN = 14;
static const int TOUCH_MISO_PIN = 12;
static const int TOUCH_MOSI_PIN = 13;
// Touch calibration (adjust if needed for your panel)
static const int TOUCH_RAW_MIN_X = 385;
static const int TOUCH_RAW_MAX_X = 3775;
static const int TOUCH_RAW_MIN_Y = 530;
static const int TOUCH_RAW_MAX_Y = 3755;
// swap the p.x & p.y for CYD 2.4" board - is there a better way to do this ?
sx = screenMapX(p.y);
sy = screenMapY(p.x);
TFT_eSPI User_Setup.h - comment out the other DRIVER
User_Setup.h
#define ILI9341_2_DRIVER // Alternative ILI9341 driver, see https://github.com/Bodmer/TFT_eSPI/issues/1172
#define TFT_WIDTH 240
#define TFT_HEIGHT 320
#define TFT_INVERSION_ON
#define TFT_BL 27 // LED back-light control pin
#define TFT_BACKLIGHT_ON HIGH // Level to turn ON back-light (HIGH or LOW)
#define USE_HSPI_PORT
#define ESP32_DMA
#define TFT_MISO 12
#define TFT_MOSI 13
#define TFT_SCLK 14
#define TFT_CS 15 // Chip select control pin
#define TFT_DC 2 // Data Command control pin
#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
#define TFT_BL 27 // LED back-light
#define TOUCH_CS 33 // Chip select pin (T_CS) of touch screen
#define TOUCH_OFFSET_ROTATION 1
Thank you POWER-PILL for a neat project !
If you have a 2.4" CYD kicking around and want to enjoy this cool project too, here is the changes I made...
From Ali Express - ESP32-2432S024R
TFT_eSPI User_Setup.h - comment out the other DRIVER