0

I have a PiFace Digital 2 and a Pi i 3 with the latest Debian and Pixel installed. My first question is, is the PiFace digital 2 compatible with the Pi 3? From what I can tell they are.

Secondly, I can't seem to get the emulator to run. I have turned on SPI and installed, following instructions here when running a sample program I get the following:

python3 /usr/share/doc/python3-pifacedigitalio/examples/blink.py
Traceback (most recent call last):
  File "/usr/share/doc/python3-pifacedigitalio/examples/blink.py", line 9, in <module>
    pifacedigital = pifacedigitalio.PiFaceDigital()
  File "/usr/lib/python3/dist-packages/pifacedigitalio/core.py", line 82, in __init__
    self.init_board()
  File "/usr/lib/python3/dist-packages/pifacedigitalio/core.py", line 107, in init_board
    h=self.hardware_addr, b=self.bus, c=self.chip_select))
pifacedigitalio.core.NoPiFaceDigitalDetectedError: No PiFace Digital board detected (hardware_addr=0, bus=0, chip_select=0).

Any ideas on how to get this working ?

1

I know this will be a late reply. But this resolved my issues.

I had the same issue. It turns out (thanks to gam3t3ch ) that the later kernels for RPI3 uses an incompatible frequence for the SPI serial channel (basically it is higher than what PiFace Digital 2 can handle - lowering this makes the display work again,

Edit file /usr/local/lib/python3.5/dist-packages/pifacecommon/spi.py

create the spi transfer struct

    transfer = spi_ioc_transfer(
        tx_buf=ctypes.addressof(wbuffer),
        rx_buf=ctypes.addressof(rbuffer),
        len=ctypes.sizeof(wbuffer),
        speed_hz=ctypes.c_uint32(100000) 
    )

Note the added setting for the speed_hz field. For me this solves all problems I had with the board on newer kernels.

https://www.raspberrypi.org/forums/viewtopic.php?t=170606

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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