You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
More of a question than a specific issue which I am hoping you can help with.
I am trying to run both an RC522 and MAX7219 (8x8 segment array) both of which use SPI.
In theory I should be able to get both to work however both libraries use PIN24. (SPI0)
Is there a change that I can make to the MFRC library so that I can get both to work? In theory I should be able to use SPI1 (Pin 26) for the reader but then the reader does not work.
I am running Raspian Buster on a few different PI's to try to get this working. (Pi3, Pi Zero etc.)
Below is a short sample of what I am trying to run:
The text runs across the matrix fine, but then fills with random flashing dots and the RFID reader does not read anything.
from luma.core.interface.serial import spi, noop
from luma.core.render import canvas
from luma.core.virtual import viewport
from luma.core.legacy import text, show_message
from luma.core.legacy.font import proportional, CP437_FONT, TINY_FONT, SINCLAIR_FONT, LCD_FONT
import RPi.GPIO as GPIO
from mfrc522 import SimpleMFRC522
More of a question than a specific issue which I am hoping you can help with.
I am trying to run both an RC522 and MAX7219 (8x8 segment array) both of which use SPI.
In theory I should be able to get both to work however both libraries use PIN24. (SPI0)
Is there a change that I can make to the MFRC library so that I can get both to work? In theory I should be able to use SPI1 (Pin 26) for the reader but then the reader does not work.
I am running Raspian Buster on a few different PI's to try to get this working. (Pi3, Pi Zero etc.)
Below is a short sample of what I am trying to run:
The text runs across the matrix fine, but then fills with random flashing dots and the RFID reader does not read anything.
from luma.core.interface.serial import spi, noop
from luma.core.render import canvas
from luma.core.virtual import viewport
from luma.core.legacy import text, show_message
from luma.core.legacy.font import proportional, CP437_FONT, TINY_FONT, SINCLAIR_FONT, LCD_FONT
import RPi.GPIO as GPIO
from mfrc522 import SimpleMFRC522
reader = SimpleMFRC522()
create matrix device
serial = spi(port=0, device=0, gpio=noop())
device = max7219(serial, cascaded=4, block_orientation=-90)
print("Created device")
show_message(device, "test", fill="white", font=proportional(CP437_FONT), scroll_delay=0.1)
try:
print("Put RFID on Pad")
id, text = reader.read()
print(id)
print(text)
finally:
GPIO.cleanup()
The text was updated successfully, but these errors were encountered: