PlatformIO Community

ST7735S Library for Teal Tab screen on Pico

I’ve added the library and dependencies for the forked library which should support my teal tab LED screen.

If I understand correctly, I should be using the initS() method for initialisation, but this method does not seem to be available in code completion and won’t compile.

When I install the library, it automatically installs this:

Which I assume it extends. Perhaps there is a conflict as the header + cpp files have the same name? How should I resolve this?


You’re saying when you put lib_deps = mbed-cognoscan/Adafruit_ST7735 in the platformio.ini it installs adafruit/Adafruit ST7735 and ST7789 Library?

Is your project using Arduino or mbed as its framework?

I had installed adafruit/Adafruit ST7735 and ST7789 previously but realised it didn’t support the S series so I manually deleted it because it would uninstall via the UI. Made sure there was no reference in the platformio.ini and it was gone from the installed libraries tab. Reappears if I add / compile with the ST7735S lib.

I’m using arduino for framework.

But the mbed-cognoscan/Adafruit_ST7735 library only supports mbed-os ( The Pico might be an extremely special case here because its default Arduino core is built on the basis of mbed-os, but given that the beforementioned library was released 6 years ago, it must have been written against an ancient mbed-os version.

In any case, if you attempt to install mbed-cognoscan/Adafruit_ST7735 PlatformIO should by default refuse to install that because of the compatibility check with mbedos (unless lib_compat_mode was changed).

Could you share the complete platformio.ini?

It also might be better if you use the latest (real) Adafruit ST7735 library and backported the needed changes (Adafruit_ST7735 - Clone of the Adafruit ST7735 library, updated for… | Mbed) to that. Seems like just a new init command list and an inversion of CS to me, nothing fancy.

; PlatformIO Project Configuration File
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
; Please visit documentation for the other options and examples

platform = raspberrypi
board = pico
framework = arduino
lib_deps = 
	adafruit/Adafruit NeoPixel @ ^1.10.5
	khoih-prog/RP2040_PWM @ ^1.3.0
	adafruit/Adafruit BusIO @ ^1.11.6
	adafruit/Adafruit GFX Library @ ^1.11.1
	adafruit/Adafruit seesaw Library @ ^1.6.2

Thanks, that might be my best option. Although I’m new to C++ it’ll definitely be an experience!

Just for fun, with a few compile fixes one can indeed get the 6 year old library to compile, can you check out GitHub - maxgerhardt/pico-st7735s-test?

Thanks for taking the time to have a look.

I checked it out and was able to compile successfully. I had to change the following lines to set the MISO to Not Connected to get it to work.

    tftSPI = new mbed::SPI(TFT_MOSI, NC, TFT_SCLK);
    tft.initS(); // initialize ST7735S chip

I’ve now got some stuff on the screen but the colour is wrong and there’s some garbled pixels. Will investigate further…

If you want to check out of a different path, there were 2 pull requests at the Adafruit library page for ST7735S support, in particular seems to be the newest.

Could you test out the alternative GitHub - maxgerhardt/pico-st7735s-test2 if you have time?

1 Like

Excellent stuff. I had to uncomment this line:

Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);

Now everything works as expected. Many thanks!

1 Like