Я пытаюсь настроить мой новый модуль светодиодного дисплея Dot Matrix MCU 8x32 с MAX7219 на моем малиновом PI3.
Я выполнил все шаги здесь https://max7219.readthedocs.io/en/0.2.3/ и, конечно же, использовал те контакты, которые они предлагают.
Когда я обедаю тестовый образец:
sudo python examples/matrix_demo.py
тогда я получу ошибку, которая никогда не запустит тестовый образец:
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
проблема не в luma.core, потому что она существует:
luma.core 1.7.2
luma.led-matrix 1.0.8
с помощью команды lsmod | grep -i spi
ответ:
spidev 7373 0
spi_bcm2835 7596 0
И ответ на команду ls -l /dev/spi*
:
crw-rw---- 1 root spi 153, 0 Aug 29 17:17 /dev/spidev0.1
также прикрепляю ответ на 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
Это мой /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