st7789-library-for-pico
st7789-library-for-pico copied to clipboard
Use an ST7789 based TFT LCD display with your Raspberry Pi Pico or any RP2040 based board 📺
ST7789 library for Pico
Use an ST7789 based TFT LCD display with your Raspberry Pi Pico or any RP2040 based board 📺
Hardware
- RP2040 board
- ST7789 TFT Display
Default Pinout
+---------+-------------------+
| ST7789 | Raspberry Pi Pico |
|---------+-------------------|
| VIN | 3V3 |
|---------+-------------------|
| GND | GND |
|---------+-------------------|
| SCK | GPIO18 |
|---------+-------------------|
| MOSI | GPIO19 |
|---------+-------------------|
| CS | GPIO17 |
|---------+-------------------|
| RST | GPIO21 |
|---------+-------------------|
| D/C | GPIO20 |
+---------+-------------------+
GPIO pins are configurable in examples or API.
CS
can be set to -1
if your display has the CS pin grounded.
Examples
See examples folder.
Cloning
git clone https://github.com/ArmDeveloperEcosystem/st7789-library-for-pico.git
Building
- Set up the Pico C/C++ SDK
- Set
PICO_SDK_PATH
export PICO_SDK_PATH=/path/to/pico-sdk
- Create
build
dir, runcmake
andmake
:
mkdir build
cd build
cmake .. -DPICO_BOARD=pico
make
- Copy example
.uf2
to Pico when in BOOT mode.
License
Apache-2.0 License
Disclaimer: This is not an official Arm product.