Pimoroni Pico Display Pack 2.0 in Arduino IDE

Hello,

is there a way to use Pimoroni Pico Display Pack 2.0 and Raspberry Pi Pico in Arduino IDE?
I have tried several pin configurations with no luck.
Does Adafruit_ST7789 library work with it?

It's on SPI0, GP16-GP19 and the C++ library is here:

https://github.com/pimoroni/pimoroni-pico/blob/main/examples/pico_display_2/pico_display_2_demo.cpp

so you should be able to make it work. It does take an ST7789 library.

Thank you for your reply EmilyJane.
I tried this code:

#include <Adafruit_ST7789.h>
#include <SPI.h>

#define TFT_DC 16
#define TFT_CS 17
#define TFT_SCLK 18
#define TFT_MOSI 19
#define TFT_RST -1

Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);

void setup(void) {

tft.init(320, 240);
tft.setRotation(3);
tft.fillScreen(ST77XX_BLACK);
tft.setCursor(0, 0);
tft.setTextColor(ST77XX_YELLOW);
tft.setTextWrap(true);
tft.print("This is a Test");
}

void loop() {
}

But it doesn't work (black screen, not even a backlight).
What am I doing wrong?

Sorry, my only suggestion would be to study the Pimoroni .cpp library and see how it differs from the Adafruit one

I added this to enable backlight:

#define BL_EN 20
pinMode(BL_EN, OUTPUT);
digitalWrite(BL_EN, HIGH); 

and now it works!

Yay! Good job!

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