Ported Adafruit_ST7735 library

I received this $7 chinese 1.8" TFT display + sd card reader from ebay (with ST7735R controller) :

I ported the existing adafruit library for the spark core. (hardware SPI only)

The library source code is here :

wiring :

GND —> GND
VCC —> +5V
NC
NC
NC
RESET —> RST
TFT A0 —> D0
TFT SDA —> A5
TFT SCK —> A3
TFT CS —> A2
SD SCK --> A3
SD MISO --> A4
SD MOSI --> A5
SD CS --> D1
LED+ —> 3.3V
LED- —> GND

I have also connected the SD card reader and did some initial tests using this library

2 Likes

Would you consider putting this library on GitHub? That way, you could “massage” it a bit and make it importable into the Spark web IDE libraries!

I didn’t write the code, Adafruit did… So I don’t feel comfortable publishing it on github or wherever under my name…

Also Adafruit can’t merge the spark core specific code into their library, because the SPARK #declare is still missing in the latest web IDE firmware.

1 Like

@wgbartley, I have this library ported :smile:

Really ? Where is it? I can’t see Adafruit_ST7735 on your github page or on this forum ?
I tried to find an existing port first, before I ported it…

@mhwlng, I never got to posting it on my github! So much to do and so little time :open_mouth:

1 Like

@mhwlng, what I decided to do is as part of my mfGFX library, I will be adding ALL the Adafruit display “driver” files as examples. That way, it will be much easier to grab a library “set” for any supported display :smiley:

@mhwlng, I was looking at my ST7565 ported library (Adafruit) and realized it was not written to work with the Adafruit_GFX library. I am going to modify it to work with my mfGFX library so it will take a little extra time. :smile:

ST7565 is a different controller (adafruit/ST7565-LCD) ?
The adafruit library that I ported is for the ST7735 controller (adafruit/Adafruit-ST7735-Library)
(p.s. Note that I used the SPARK #declare and did not remove/change any of the arduino/teensy/etc. specific code...)

I have now also connected the SD card reader and did some initial tests using this library :

(I had to change the #includes slightly for use in the web IDE
e.g. change from

#include <Application.h> 

to

#include "application.h"

note that I had to resize the browser window over 3 monitors , otherwise I can’t select all libraries cpp/h files (no horizontal scroll function)

Pinging @jgoggins and @shime for this one!

@mhwlng, I missed that little part! I am not sure why Adafruit did not create a GFX compatible version for the ST7565 and the ST7735 libraries. I am tempted to do so. Would the ability to create and use fonts using the mfGFX library be something that might interest you and others?

I can't speak for others, but I don't have any displays with the ST7565 controller.
The ST7735 library that I ported is already GFX compatible...

just ordered one off ebay. looks like i have 2-3 weeks to watch this thread closely…

Hey @mhwlng , can you use the file list on the drawer on the left to select files instead of the tabs at the top?

Yes, that works ... I never thought of that :slight_smile:

any luck on the mfGFX library? i got my LCD from ebay…and i tried to download the OP’s library and manually added it to Spark, but never got it to work.
was hoping to find a good lib going.

1 Like

@avidan, which LCD did you want to use with the mGFX library?

I bought the 7 dollar one from the OP on ebay

@avidan, it may be my age but what is OP and can you give me the ebay link? :blush:

1 Like