Open
Description
I was able to use this library with RP2040-PiZero board and 1.3inch display HAT. For anyone trying to use this library, you will need to configure SPI1 pins manually.
Board: https://www.waveshare.com/wiki/RP2040-PiZero
Display: https://www.waveshare.com/1.3inch-lcd-hat.htm
#include <Adafruit_GFX.h>
#include <Adafruit_ST7789.h>
#include <SPI.h>
#define TFT_CS 8
#define TFT_RST 27
#define TFT_DC 25
#define TFT_MOSI 11
#define TFT_SCLK 10
Adafruit_ST7789 tft = Adafruit_ST7789(&SPI1, TFT_CS, TFT_DC, TFT_RST);
void setup(void) {
gpio_set_function(TFT_MOSI, GPIO_FUNC_SPI);
gpio_set_function(TFT_SCLK, GPIO_FUNC_SPI);
tft.init(240, 240);
tft.setRotation(3);
Serial.println(F("Initialized"));
}
Metadata
Metadata
Assignees
Labels
No labels