Raspberry Pi software - ghollyp/uvled GitHub Wiki

Wiring

LED matrix

The LED matrix is connected to the Raspberry Pi SPI bus via peripheral header. Depending on Raspberry Pi model you can use SPI0 or SPI1 device and chip selects CE0 - CE2. Please note that SPI is disabled in the operating system by default, must be enabled in raspi-config.

The LED matrix can be powered from separate 5V rail. However on later Raspberry Pi models (2,3) it can be powered from the pins 2 and 4 on the P1 header. GND can be connected to any GND pin on P1 header.

Wiring to SPI0 (available on all RPi versions)

LED matrix Function GPIO Pin Device
DATA MOSI GPIO10 19
CLK SCLK GPIO11 23
CS CE0
CE1
GPIO08
GPIO07
24
26
/dev/spidev0.0
/dev/spidev0.1
GND GND 6,9,14,20,25,30,34,39
5V +5V 2,4

Wiring to SPI1 (available on 40 pin header only)

LED matrix Function GPIO Pin Device
DATA MOSI GPIO20 38
CLK SCLK GPIO21 40
CS CE0
CE1
CE2
GPIO18
GPIO17
GPIO16
12
11
36
/dev/spidev1.0
/dev/spidev1.1
/dev/spidev1.2

Arduino UNO

Arduino is connected to the Raspberry Pi via USB cable and the communication is serial over USB. The uvled program opens by default /dev/ttyUSB0 virtual serial port.

Software

uvled is a simple command line tool to control MAX7219 based LED matrix panels connected to Raspberry Pi. It requires spi_bcm2708 linux driver to access SPI bus. The application:

  • can do exposure of text or png bitmap on LED panel for specified time
  • can control grbl xy gantry to move the LED panel
  • create png bitmaps from fonts and text

Please check uvled command line syntax.

The source code will be available on github after some required consolidation.

⚠️ **GitHub.com Fallback** ⚠️