I'm trying to setting up my new Dot Matrix MCU LED Display Module 8x32 with MAX7219 on my Raspberry Pi 3.

I followed all the steps here https://max7219.readthedocs.io/en/0.2.3/ and of course using the pins that they suggest.

When I launch a test sample:

sudo python examples/matrix_demo.py

then I will get an error that never start the sample test:

Traceback (most recent call last):
  File "examples/matrix_demo.py", line 120, in <module>
    demo(args.cascaded, args.block_orientation, args.rotate)
  File "examples/matrix_demo.py", line 20, in demo
    serial = spi(port=0, device=0, gpio=noop())
  File "/usr/local/lib/python2.7/dist-packages/luma.core-1.7.2-py2.7.egg/luma/core/interface/serial.py", line 263, in __init__
    raise luma.core.error.DeviceNotFoundError('SPI device not found')
luma.core.error.DeviceNotFoundError: SPI device not found

the problem isn't luma.core because it exists:

luma.core                1.7.2     
luma.led-matrix          1.0.8

With the command lsmod | grep -i spi the answer is:

spidev                  7373  0 
spi_bcm2835             7596  0 

And the answer for the command ls -l /dev/spi* is:

crw-rw---- 1 root spi 153, 0 Aug 29 17:17 /dev/spidev0.1

also I attach the response for find /sys/bus | grep spi


This is my /boot/config.txt

 For more options and information see
# http://rpf.io/configtxtreadme
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border

# uncomment to force a console size. By default it will be display's size minus
# overscan.

# uncomment if hdmi display is not detected and composite is being output

# uncomment to force a specific HDMI mode (this will force VGA)

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display

# uncomment for composite PAL

#uncomment to overclock the arm. 700 MHz is the default.

# Uncomment some or all of these to enable the optional hardware interfaces

# Uncomment this to enable the lirc-rpi module

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
  • Same issue. No devices in /dev/spi* But found in /sys/bus/spi/devices/spi I created symlink sudo ln -s /sys/bus/spi/devices/spi0.1 /dev/spi0.1 But to no avail. Any fix guys? Apr 11, 2019 at 10:30

1 Answer 1


The error is indicated in the traceback. Python wants to connect to SPI bus 0, channel 0.

SPI bus 0, channel 0 does not appear in your device list so it's not surprising Python can't connect.

To me this suggests that something in device tree has either grabbed that channel or that something in device tree has been told not to create a device for that channel.

Either way you need to examine /boot/config.txt and see what non-default SPI entries have been made. One of them is forcing the above.

P.S. It's best if you cut&paste error messages when possible as that allows us to cut&paste relevant parts in a response.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.