Fix my TFt screen

I am trying to get a 1.8" TFT screen to work to work using a Raspberry Pi Pico 2 however, my code doesn't seem to be working. My Backlgiht turns on so I know it is powered but thats it. My current code is:

`#include <Adafruit_GFX.h>
#include <Adafruit_ST7735.h>
#include <SPI.h>

#define TFT_CS 17
#define TFT_SCK 10
#define TFT_SDA 11
#define TFT_RST 20
#define TFT_DC 21

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

void setup() {

tft.initR(INITR_BLACKTAB); // initialize a ST7735S chip, black tab
tft.fillScreen(ST7735_BLACK); // Fill the screen with Black
tft.setRotation(1); // Set rotation to Portrait mode (set to '1' for Landscape)
tft.setTextWrap(false);

tft.drawRoundRect(0, 0, 83, 31, 10, ST7735_CYAN); // Draw a Rectangle x,y, across, down with corner & Colour Values
tft.drawRoundRect(0, 35, 160, 93, 10, ST7735_CYAN); // Draw a Rectangle x,y, across, down with corner & Colour Values
tft.drawLine(80, 65, 80, 110, ST7735_CYAN);
}

void loop() {
}`

I also hvae BL and VCC to 3.3V and GND to GND on pin 23. Is there anyone who can help me out? im unsure of my exact model but it is simlar to this one: LINK

Hi. I have not tried this with a Pico 2 myself, so this is only from reading the library and board-package documents.

In the Adafruit ST7735 library source, the constructor you use, Adafruit_ST7735(cs, dc, rst), is described as "default hardware SPI". It does not take the SCK and SDA pins you defined, so TFT_SCK and TFT_SDA (10 and 11) are never passed to the library. The library also has a version that takes a pointer to an SPI device, for example &SPI1: Adafruit_ST7735(&SPI1, cs, dc, rst).

The Arduino-Pico documents say the pins of SPI and SPI1 can be changed with setSCK() and setTX() (and setCS/setRX) before SPI begins.

A guess, not checked: pins 10 and 11 may belong to the second SPI interface (SPI1) rather than the default one. Please check that against the Pico 2 pinout. If so, the SPI1 constructor could be what you need. Also, the backlight lighting up only shows the power is connected, it does not tell whether the display is receiving data.

OMD it worked TYSM. I've never used a Rasberry pi before so i was using code uploaded to an Arduino uno as a base.