%Run BlinkaMax7219.py
Traceback (most recent call last):
File "/home/pi/Iain/BlinkaMax7219.py", line 11, in
spi = board.SPI()
File "/usr/local/lib/python3.9/dist-packages/board.py", line 359, in SPI
return busio.SPI(SCLK, MOSI, MISO)
File "/usr/local/lib/python3.9/dist-packages/busio.py", line 295, in init
for portId, portSck, portMosi, portMiso in spiPorts:
TypeError: cannot unpack non-iterable int object
I have SPI enabled : -
pi@PotatoPi2:~/Iain $ ls /dev/spi*
/dev/spidev0.0
and Matrix on the Le Potato operates fine using luma.led_matrix
I'm pretty sure the pin mapping should be SPI1_SCLK = GPIO290 ?? in the file below not GPIO223 but it doesn't fix the error above.
i2c and digitalio work perfectly on the Le Potato under Blinka but not the SPI interface ? Code seems pretty standard for different boards so I can't see what the problem is ??
......................................................And a little later on
in pin.py added square brackets to spiPorts
I'm attempting to run the Max 7219 custom matrix example from : -
https://github.com/adafruit/Adafruit_CircuitPython_MAX7219/tree/1.5.9/examples and the program is stock apart from cs = digitalio.DigitalInOut(board.P29)
and get the following error : -
I have SPI enabled : - pi@PotatoPi2:~/Iain $ ls /dev/spi* /dev/spidev0.0
and Matrix on the Le Potato operates fine using luma.led_matrix
I'm pretty sure the pin mapping should be SPI1_SCLK = GPIO290 ?? in the file below not GPIO223 but it doesn't fix the error above.
https://github.com/adafruit/Adafruit_Blinka/blob/main/src/adafruit_blinka/microcontroller/amlogic/s905x/pin.py
i2c and digitalio work perfectly on the Le Potato under Blinka but not the SPI interface ? Code seems pretty standard for different boards so I can't see what the problem is ??
......................................................And a little later on in pin.py added square brackets to spiPorts
SPI0_SCLK = GPIO290 SPI0_MISO = GPIO288 SPI0_MOSI = GPIO287 SPI0_CS = GPIO289
i2cPorts = ( (0, I2C0_SCK, I2C0_SDA), (1, I2C1_SCK, I2C1_SDA), )
spiPorts = [(0, SPI0_SCLK, SPI0_MOSI, SPI0_MISO)]
in aml_s905x_cc_v1.py
SCLK = pin.SPI0_SCLK MOSI = pin.SPI0_MOSI MISO = pin.SPI0_MISO SPI_CS = pin.SPI0_CS
and we have some flashing lights.