Extention of the Adafruit_GFX Library to interface with ST7789 IPS SPI 240x240 pixel displays.
You must install the Adafruit_GFX library first, in the Arduino IDE go to Sketch > Include Library > Manage Libraries and search for Adafruit GFX, install it.
Then
- Download: https://sparks.gogo.co.nz/Arduino-ST7789-Library.zip
- Open the Arduino IDE
- Select the menu item Sketch > Import Library > Add Library
- Choose to install the Arduino-ST7789-Library.zip file you downloaded
- Now you can choose File > Examples > Arduino-ST7789-Library > helloworld
The ST7789 is a 3.3 Volt Module, both power and signalling is 3.3v, so you can not connect it directly to a 5v Arduino, you will need to level-shift.
Display | Arduino |
---|---|
VCC | 3.3v |
GND | Gnd |
SCL | Pin 13 (SCK) |
SDA | Pin 11 (MOSI) |
RES | Pin 9 |
DC | Pin 8 |
BLK | Leave disconnected |
Display | Arduino |
---|---|
VCC | 3.3v |
GND | Gnd |
SCL | Pin 52 (SCK) |
SDA | Pin 51 (MOSI) |
RES | Pin 9 |
DC | Pin 8 |
BLK | Leave disconnected |
Open the HelloWorld example. as this library uses the Adafruit_GFX library as it's foundation you should google for more information about using the Adafruit_GFX library.
The display seems quite sensitive to signal voltage, there are examples around on the internet which use a resistor-divider for level-shifting the signals, however you may find that this does not work (at all, or not reliably) if you are powering your Arduino from less than about 5.25v in my testing as the signal voltage is too low.
I would recommend using a more precise level-shifting method, such as 3.3v zener diodes with resistors, or the good old CD4050BE non-inverting buffer.
By all means!