ArmDeveloperEcosystem / st7789-library-for-pico

Use an ST7789 based TFT LCD display with your Raspberry Pi Pico or any RP2040 based board 📺
Apache License 2.0
67 stars 9 forks source link
raspberry-pi-pico rp2040 st7789

ST7789 library for Pico

Use an ST7789 based TFT LCD display with your Raspberry Pi Pico or any RP2040 based board 📺

Hardware

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

  1. Set up the Pico C/C++ SDK
  2. Set PICO_SDK_PATH
    export PICO_SDK_PATH=/path/to/pico-sdk
  3. Create build dir, run cmake and make:
    mkdir build
    cd build
    cmake .. -DPICO_BOARD=pico
    make
  4. Copy example .uf2 to Pico when in BOOT mode.

License

Apache-2.0 License


Disclaimer: This is not an official Arm product.