How to configure TFT_eSPI library to use a ILI9488 on photon 2

I am trying to set up a TFT display based on the ILI9488 chip with Photon 2. I have managed to make it work by modifying the Adafruit_ILI9341 libraries, but I don't have all the graphical facilities that TFT_eSPI seems to offer, especially in the use of sprites. However, I see that the library published in the Particle library bank is different from the one on GitHub. Can someone guide me with some documentation or hints to get it working? Thank you!

It's generally easy to port Adafruit libraries. You will definitely want to use Particle Workbench instead of the Web IDE because you will want to use your locally modified version and not publish a new version of the current public library.

Copy the version from Github into the lib directory in your Particle project.

If there are .cpp and .h files at the top level of the project, move them into a subdirectory src instead.

If the library depends on other libraries, repeat the process for those libraries. For ILI9488, you'll probably need Adafruit_GFX and Adafruit_STMPE610.

I did port Adafruit_ILI9341_RK and its dependencies, but a few years ago, so it's probably out of date as well.

I'm in a similar place, struggling to get an Adafruit 1.44" TFT going on Photon2 with the Adafruit_ST7735 library. One of my students had it working last fall and said it was straightforward, but it seems like there have been some changes and my students and I can't seem to make it work at this time.

Is there a good place to learn about the changes Adafruit has made since last September (.cpp vs .ino, why the template changed, etc)? I get so busy teaching during the semester I don't have time to explore updates until Spring/Summer.

I would use the Adafruit_ST7735_RK library which should work. If it doesn't, then information like: is it a compile error or runtime error? What is the device LED status? Are there any debug logs printed to USB serial? What is the connection diagram? What Particle device? Which version of Device OS?

1 Like

Thanks for the reminder to use the "_RK" library. I had forgotten that. Here is the code, which compiles and flashes, but doesn't write to screen. (No errors at this time)

#include "/Users/slbrento/Desktop/P2_TFT/P2_3_1/lib/Adafruit_ST7735/src/Adafruit_ST7735.h"

#define CS D4

#define RST D0

#define DC D1

#define MAIZE 0xFE01

#define BLUE 0x00E7

Adafruit_ST7735 display = Adafruit_ST7735(CS, DC, RST);

int BlackColor = display.Color565(0,0,0);

int GreenColor = display.Color565(0,200,0);

void setup() {

display.initR(BLUE); //initialize display

//set background Color

display.setCursor(5,5); //start drawing here

display.setTextColor(GreenColor);

display.setTextWrap(true);

display.setTextSize(3);

display.print("I love PIxD");

}

void loop() {

}

Project properties file:

name=P2_Roger_31B

dependencies.Adafruit_ST7735_RK=1.2.8

Project configured to work with Photon 2, OS 5.8.0, Photon name SB.

Wires Connected:
Power & Ground for Photon to breadboard, TFT to breadboard
Photon2 MO to TFT SI
Photon2 MI to TFT SO
Photon2 SCK to TFT SCK
Photon2 S3 to TFT TCS
Photon2 D0 to TFT RST
Photon2 D1 to TFT D/C
Photon2 D4 to TFT CCS