Home - wryan67/udd_rpi_lib GitHub Wiki
This library currently supports these display chips at any resolution or rotation:
- ST7789 - Example Product
- ST7735 - Example Product
- ws2811, ws2812, ws2812 [NeoPixel matrix]
- Wiki how: How-to-Build-a-Custom-NeoPixel-Matrix
Requirements
On your Raspberry Pi, please use the raspi-config program to enable the SPI interface.
$ sudo raspi-config
Prerequisites
Please install the following packages. Note that the ads1115 library is only needed for the NeoPixel demo program.
- WiringPi, which should be installed already, but you may have to follow the update instructions for a RPi4
- https://github.com/wryan67/neopixel_rpi_lib.git
- https://github.com/wryan67/ads1115_rpi_lib.git
Download
Use git to download the software from github.com:
$ cd ~/projects { or wherever you keep downloads }
$ git clone https://github.com/wryan67/udd_rpi_lib.git
Install
To compile this library, navigate into the project folder and use the make utility to compile and install Voltage Catcher. Sudo is required for the install command in order to place the libraries into the system folders.
$ cd ~/projects { or wherever you keep downloads }
$ cd udd_rpi_lib
$ make install
Wiring Diagrams
The spreadsheet "wiringDiagrams.xlsx" in the readme folder contains example wiring diagrams for the supported devices.
Examples
There are two demos, one using a single display, and one using two displays. You need to be in the bin folder when running the demos as the images are codes with relative paths.
$ cd bin
$ ./demo1
--------------------------------------------
-----d1 config------------------------------
displayId: 0
width: 240
height: 320
xOffset: 0
yOffset: 0
cs: 21
dc: 22
rst: 23
blk: 7
spiChannel: 0
spiSpeed: 90000000
handle: 4
press control-c to quit
^C
$ ./demo2
--------------------------------------------
-----d1 config------------------------------
displayId: 0
width: 240
height: 320
xOffset: 0
yOffset: 0
cs: 21
dc: 22
rst: 23
blk: 7
spiChannel: 0
spiSpeed: 90000000
handle: 4
--------------------------------------------
-----d2 config------------------------------
init st7735
displayId: 1
width: 128
height: 128
xOffset: 2
yOffset: 1
cs: 24
dc: 25
rst: 26
blk: 7
spiChannel: 0
spiSpeed: 35000000
handle: 5
press control-c to quit
^C