I have an ST7735 (from A-ZDelivery) and a Teensy 4.1, whatever I do I just can get the screen to even come on at all, its connected up as follows:
LED > 36
SCK > 13
SDA > 11
A0 > 33
RESET > 7
CS > 2
GROUND > GROUND
VCC > 5V
LED > 36
SCK > 13
SDA > 11
A0 > 33
RESET > 7
CS > 2
GROUND > GROUND
VCC > 5V
C++:
#include <Adafruit_GFX.h> // Include the Adafruit GFX Library
#include <Adafruit_ST7735.h> // Include the Adafruit ST7735 Library
#include <SPI.h>
#define mosi 11
#define TFT_CS 2
#define TFT_RST 7
#define TFT_DC 33
#define TFT_SCLK 13
#define BACKLIGHT_PIN 36
//Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST, TFT_SCLK);
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
void setup() {
Serial.begin(9600);
Serial.print(F("init 1.8 tft screen"));
tft.initR(INITR_GREENTAB); // Init ST7735S chip, black tab
Serial.println(F("Initialized"));
tft.fillScreen(ST77XX_BLACK);
drawtext("Hello! from \n AZ-delivery", ST77XX_RED);
delay(1000);
fillScreenBlink(ST77XX_WHITE, ST77XX_RED);
delay(500);
Serial.println("done");
delay(1000);
}
void loop() {
Serial.print("Running....");
Serial.print("\n");
tft.invertDisplay(true);
delay(500);
tft.invertDisplay(false);
delay(500);
}
void drawtext(char *text, uint16_t color) {
tft.setCursor(0, 50);
tft.setTextColor(color);
tft.setTextSize(2);
tft.setTextWrap(true);
tft.print(text);
}
void fillScreenBlink(uint16_t color1, uint16_t color2) {
tft.fillScreen(color1);
delay(1000);
tft.fillScreen(color2);
}