Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP-32 radio #46

Open
digits1 opened this issue Sep 8, 2017 · 2 comments
Open

ESP-32 radio #46

digits1 opened this issue Sep 8, 2017 · 2 comments

Comments

@digits1
Copy link

digits1 commented Sep 8, 2017

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.

@Edzelf
Copy link
Owner

Edzelf commented Sep 8, 2017

There are only a few lines of code for the display. It should be easy to replace them with the code for any display.

@derpicknicker1
Copy link

derpicknicker1 commented Oct 16, 2017

To do this, do the following:

  1. Get the lib for ST7735 here or install it with Library Manager (search for Adafruit_ST7735)

  2. Include the header file for ST7735 instead of ILI9163. Change #include <TFT_ILI9163C.h> to #include <Adafruit_ST7735.h> in Line 105

  3. 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
  1. Change line 224 from TFT_ILI9163C* tft = NULL ; to Adafruit_ST7735* tft = NULL ;

  2. 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);
  1. Delete line 2768 which is tft->clearScreen() ;

Thats all.

derpicknicker1 added a commit to derpicknicker1/ESP32-Radio that referenced this issue Oct 17, 2017
Select display driver by a define

`#define DISP [...]`

Where `[...]` can be:
* `ILI9163C `
* `ST7735` _(more common)_

Connections to the ESP32 are the same for both display types.
Install Adafruit_ST7735 library via library manager in the Arduino IDE.

FIX Edzelf#46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants