From d28e43574b6b2695585e9a1fb12e493d05e55caf Mon Sep 17 00:00:00 2001 From: Bodmer Date: Sat, 2 Nov 2019 15:14:20 +0000 Subject: [PATCH] Fix #406 --- TFT_Drivers/ST7735_Rotation.h | 4 ++-- User_Setups/Setup43_ST7735.h | 13 +++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/TFT_Drivers/ST7735_Rotation.h b/TFT_Drivers/ST7735_Rotation.h index 6163abb..73df2ab 100644 --- a/TFT_Drivers/ST7735_Rotation.h +++ b/TFT_Drivers/ST7735_Rotation.h @@ -84,8 +84,8 @@ rowstart = 0; } else if(tabcolor == INITR_GREENTAB160x80) { writedata(TFT_MAD_BGR); - colstart = 0; - rowstart = 0; + colstart = 26; + rowstart = 1; } else if(tabcolor == INITR_REDTAB160x80) { writedata(TFT_MAD_BGR); colstart = 24; diff --git a/User_Setups/Setup43_ST7735.h b/User_Setups/Setup43_ST7735.h index 8865f54..46f6e7e 100644 --- a/User_Setups/Setup43_ST7735.h +++ b/User_Setups/Setup43_ST7735.h @@ -11,7 +11,7 @@ #define ST7735_GREENTAB160x80 - +#ifdef ESP32 #define TFT_MISO 19 #define TFT_MOSI 23 #define TFT_SCLK 18 @@ -19,7 +19,16 @@ #define TFT_DC 2 // Data Command control pin #define TFT_RST 4 // Reset pin (could connect to RST pin) //#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST - +#else +// Display GND to NodeMCU pin GND (0V) +// Display VCC to NodeMCU 5V or 3.3V +// Display SCK to NodeMCU pin D5 +// Display SDI/MOSI to NodeMCU pin D7 +// Display BLK to NodeMCU pin VIN +#define TFT_CS PIN_D8 // Chip select control pin D8 +#define TFT_DC PIN_D3 // Data Command control pin +#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) +#endif #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters