1.77" ST7735 TFT display

Has anyone ever had any success getting a cheap ST7735 based display to work with an Argon (Firmware v2.10)? I can see some similar threads regarding Photons.

The device in question is the same as used in this blog:

After failing to get it to display anything (just the white screen), I tried it on an Arduino Nano and it worked fine. The wiring I have used is (let me know if there is a table function on this BB!):

Screen        NanoPin     NanoPinDesc    Argon     ArgonPinDesc
1 GND         GND         GND            GND       GND
2 VSS         5V          5V             3V3       3v3
3 SCK         D13         SCK            D13       SPI_SCK
4 SDA         D11         MOSI           D12       SPI_MOSI
5 RES         D12         MISO           D11       SPI_MISO
6 DC          D8          D8             D8        D8
7 CS          D10         SS             A5        SPI_SS
8 LEDA        3v3         3v3            3v3       3v3

On the Argon, the code I have used (found on another post)

#include <Adafruit_ST7735.h> // Hardware-specific library for ST7735


#define TFT_CS         A5
#define TFT_RST        D11                                           
#define TFT_DC         D8

//#define COLOR1 ST7735_WHITE
//#define COLOR2 ST7735_BLACK

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


void setup()
{
	tft.initR( INITR_GREENTAB );
     
	tft.fillScreen(ST7735_BLACK);

    tft.setCursor(0, 0);
    tft.setTextColor(ST7735_WHITE);
    tft.setTextWrap(true);
    tft.print("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur adipiscing ante sed nibh tincidunt feugiat. Maecenas enim massa, fringilla");     
    
    tft.drawLine(0, 0, tft.width()-1, tft.height()-1, ST7735_YELLOW);
    tft.drawLine(tft.width()-1, 0, 0, tft.height()-1, ST7735_YELLOW);

    tft.drawPixel(0, tft.height()/2, ST7735_GREEN);

}

void loop() {

}

On the nano, the header is slightly different

#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library for ST7735
#include <Adafruit_ST7789.h> // Hardware-specific library for ST7789
#include <SPI.h>


  #define TFT_CS        10
  #define TFT_RST       12 // Or set to -1 and connect to Arduino RESET pin
  #define TFT_DC         8

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

It works perfectly on the nano, as do a number of other example programs. This uses the Adafruit library, the _RK library fails to compile (I can include errors if useful)

Adding the error messages is a bad move :wink:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.