Open digits1 opened 7 years ago
There are only a few lines of code for the display. It should be easy to replace them with the code for any display.
To do this, do the following:
Get the lib for ST7735 here or install it with Library Manager (search for Adafruit_ST7735)
Include the header file for ST7735 instead of ILI9163. Change #include <TFT_ILI9163C.h>
to #include <Adafruit_ST7735.h>
in Line 105
Change lines 115 to 118 to look like this:
#define BLACK ST7735_BLACK
#define BLUE ST7735_BLUE
#define RED ST7735_RED
#define GREEN ST7735_GREEN
Change line 224 from TFT_ILI9163C* tft = NULL ;
to Adafruit_ST7735* tft = NULL ;
Change lines 2763 to 2766 which will look like this
tft = new TFT_ILI9163C ( ini_block.tft_cs_pin,
ini_block.tft_dc_pin ) ;
tft->begin() ;
tft->fillRect ( 0, 0, 160, 128, BLACK ) ;
to the following:
tft = new Adafruit_ST7735 ( ini_block.tft_cs_pin,
ini_block.tft_dc_pin, 0 ) ;
tft->initR(INITR_BLACKTAB);
tft->fillScreen(BLACK);
tft->clearScreen() ;
Thats all.
PROMT Hello! I very much like the project of radio on esp32. I have such question. Why only ili9163? With other lcd, for example St7735 will be options? Thanks.