1

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

/sys/bus/platform/devices/3f204000.spi
/sys/bus/platform/drivers/spi-bcm2835
/sys/bus/platform/drivers/spi-bcm2835/bind
/sys/bus/platform/drivers/spi-bcm2835/unbind
/sys/bus/platform/drivers/spi-bcm2835/module
/sys/bus/platform/drivers/spi-bcm2835/uevent
/sys/bus/platform/drivers/spi-bcm2835/3f204000.spi
/sys/bus/spi
/sys/bus/spi/drivers_probe
/sys/bus/spi/devices
/sys/bus/spi/devices/spi0.0
/sys/bus/spi/devices/spi0.1
/sys/bus/spi/uevent
/sys/bus/spi/drivers
/sys/bus/spi/drivers/spidev
/sys/bus/spi/drivers/spidev/bind
/sys/bus/spi/drivers/spidev/unbind
/sys/bus/spi/drivers/spidev/spi0.1
/sys/bus/spi/drivers/spidev/module
/sys/bus/spi/drivers/spidev/uevent
/sys/bus/spi/drivers/stmpe-spi
/sys/bus/spi/drivers/stmpe-spi/bind
/sys/bus/spi/drivers/stmpe-spi/unbind
/sys/bus/spi/drivers/stmpe-spi/uevent
/sys/bus/spi/drivers/fb_st7735r
/sys/bus/spi/drivers/fb_st7735r/spi0.0
/sys/bus/spi/drivers/fb_st7735r/bind
/sys/bus/spi/drivers/fb_st7735r/unbind
/sys/bus/spi/drivers/fb_st7735r/module
/sys/bus/spi/drivers/fb_st7735r/uevent
/sys/bus/spi/drivers_autoprobe

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
#hdmi_safe=1

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

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

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

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

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

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

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

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
dtparam=i2c1=on
#dtparam=i2s=on
dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

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

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
enable_uart=1
1
  • 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

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.

0

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.