0

Can anybody definitively say if the "PiFace Digital 2" is compatible with the "Raspberry Pi Zero W rev 1.1" or not ?

I cannot find any Information on the web - besides a mention in a Book behind a paywall: https://subscription.packtpub.com/book/hardware_and_creative/9781786463852/7/ch07lvl1sec88/interfacing-the-piface-with-the-rpz

The error message i get from python is:

pifacedigitalio.core.NoPiFaceDigitalDetectedError: No PiFace Digital board detected (hardware_addr=0, bus=0, chip_select=0).

I've tried everything I could find on the web, including:

As @Dougie suggested:

root@smoakpi:/home/pi# git clone https://github.com/piface/pifacecommon.git
Cloning into 'pifacecommon'...
remote: Enumerating objects: 12, done.
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 669 (delta 4), reused 3 (delta 0), pack-reused 657
Receiving objects: 100% (669/669), 304.56 KiB | 682.00 KiB/s, done.
Resolving deltas: 100% (368/368), done.
root@smoakpi:/home/pi# cd pifacecommon/
root@smoakpi:/home/pi/pifacecommon# python
python      python2     python2.7   python3     python3.7   python3.7m  python3m
root@smoakpi:/home/pi/pifacecommon# python setup.py install
running install
running build
running build_py
creating build
creating build/lib.linux-armv6l-2.7
creating build/lib.linux-armv6l-2.7/pifacecommon
copying pifacecommon/interrupts.py -> build/lib.linux-armv6l-2.7/pifacecommon
copying pifacecommon/core.py -> build/lib.linux-armv6l-2.7/pifacecommon
copying pifacecommon/spi.py -> build/lib.linux-armv6l-2.7/pifacecommon
copying pifacecommon/asm_generic_ioctl.py -> build/lib.linux-armv6l-2.7/pifacecommon
copying pifacecommon/mcp23s17.py -> build/lib.linux-armv6l-2.7/pifacecommon
copying pifacecommon/__init__.py -> build/lib.linux-armv6l-2.7/pifacecommon
copying pifacecommon/version.py -> build/lib.linux-armv6l-2.7/pifacecommon
copying pifacecommon/linux_spi_spidev.py -> build/lib.linux-armv6l-2.7/pifacecommon
running install_lib
creating /usr/local/lib/python2.7/dist-packages/pifacecommon
copying build/lib.linux-armv6l-2.7/pifacecommon/interrupts.py -> /usr/local/lib/python2.7/dist-packages/pifacecommon
copying build/lib.linux-armv6l-2.7/pifacecommon/core.py -> /usr/local/lib/python2.7/dist-packages/pifacecommon
copying build/lib.linux-armv6l-2.7/pifacecommon/spi.py -> /usr/local/lib/python2.7/dist-packages/pifacecommon
copying build/lib.linux-armv6l-2.7/pifacecommon/asm_generic_ioctl.py -> /usr/local/lib/python2.7/dist-packages/pifacecommon
copying build/lib.linux-armv6l-2.7/pifacecommon/mcp23s17.py -> /usr/local/lib/python2.7/dist-packages/pifacecommon
copying build/lib.linux-armv6l-2.7/pifacecommon/__init__.py -> /usr/local/lib/python2.7/dist-packages/pifacecommon
copying build/lib.linux-armv6l-2.7/pifacecommon/version.py -> /usr/local/lib/python2.7/dist-packages/pifacecommon
copying build/lib.linux-armv6l-2.7/pifacecommon/linux_spi_spidev.py -> /usr/local/lib/python2.7/dist-packages/pifacecommon
byte-compiling /usr/local/lib/python2.7/dist-packages/pifacecommon/interrupts.py to interrupts.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/pifacecommon/core.py to core.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/pifacecommon/spi.py to spi.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/pifacecommon/asm_generic_ioctl.py to asm_generic_ioctl.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/pifacecommon/mcp23s17.py to mcp23s17.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/pifacecommon/__init__.py to __init__.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/pifacecommon/version.py to version.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/pifacecommon/linux_spi_spidev.py to linux_spi_spidev.pyc
running install_egg_info
Writing /usr/local/lib/python2.7/dist-packages/pifacecommon-4.2.2.egg-info
root@smoakpi:/home/pi/pifacecommon# cd ..
root@smoakpi:/home/pi# git clone https://github.com/piface/pifacedigitalio.git
Cloning into 'pifacedigitalio'...
remote: Enumerating objects: 756, done.
remote: Total 756 (delta 0), reused 0 (delta 0), pack-reused 756
Receiving objects: 100% (756/756), 1.05 MiB | 856.00 KiB/s, done.
Resolving deltas: 100% (372/372), done.
root@smoakpi:/home/pi# cd pifacedigitalio/
root@smoakpi:/home/pi/pifacedigitalio# ls
CHANGELOG  COPYING  docs  examples  MANIFEST.in  pifacedigitalio  README.md  requirements.txt  setup.py  tests.py
root@smoakpi:/home/pi/pifacedigitalio# python setup.py install
running install
running build
running build_py
creating build
creating build/lib.linux-armv6l-2.7
creating build/lib.linux-armv6l-2.7/pifacedigitalio
copying pifacedigitalio/core.py -> build/lib.linux-armv6l-2.7/pifacedigitalio
copying pifacedigitalio/__init__.py -> build/lib.linux-armv6l-2.7/pifacedigitalio
copying pifacedigitalio/version.py -> build/lib.linux-armv6l-2.7/pifacedigitalio
running install_lib
creating /usr/local/lib/python2.7/dist-packages/pifacedigitalio
copying build/lib.linux-armv6l-2.7/pifacedigitalio/core.py -> /usr/local/lib/python2.7/dist-packages/pifacedigitalio
copying build/lib.linux-armv6l-2.7/pifacedigitalio/__init__.py -> /usr/local/lib/python2.7/dist-packages/pifacedigitalio
copying build/lib.linux-armv6l-2.7/pifacedigitalio/version.py -> /usr/local/lib/python2.7/dist-packages/pifacedigitalio
byte-compiling /usr/local/lib/python2.7/dist-packages/pifacedigitalio/core.py to core.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/pifacedigitalio/__init__.py to __init__.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/pifacedigitalio/version.py to version.pyc
running install_egg_info
Writing /usr/local/lib/python2.7/dist-packages/pifacedigitalio-3.1.0.egg-info
root@smoakpi:/home/pi/pifacedigitalio# python examples/blink.py
Traceback (most recent call last):
  File "examples/blink.py", line 9, in 
    pifacedigital = pifacedigitalio.PiFaceDigital()
  File "/usr/local/lib/python2.7/dist-packages/pifacedigitalio/core.py", line 82, in __init__
    self.init_board()
  File "/usr/local/lib/python2.7/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).

Update:

Did that same as above on a Raspberry Pi 3b and it just worked - so there are two options - pi zero is not compatible or my pi zero is broken

  • Error looks like jumper issue - anything else on the SPI bus? Maybe worth taking the 10 day trial to packt though the sample pages you can see using ‘next’ show connections direct to the Pi (gave up after 5 pages though). CPC state Compatible with Raspberry Pi 2 Model B, Raspberry Pi Model B+/A+ – Andyroo Jun 19 at 20:46
  • It is compatible, but the software has to be cloned from github and installed manually. You'll need github.com/piface/pifacecommon and github.com/piface/pifacedigitalio – Dougie Jun 19 at 21:29
  • @Dougie sorry for the late reply - was moving and didn't have internet - i updated my post according to your suggestions. – Marie Schreiber Jun 24 at 18:52
0

Yes it is compatible with the hardware -- it came out before the Pi Zero was created. The book also predates the Pi Zero.

PiFace Digital communicates over SPI, and I know you say it's enabled -- does /boot/config.txt have a line?

dtparam=spi=on

https://github.com/piface/pifacedigitalio/issues/39#issuecomment-633291166

| improve this answer | |
  • sorry for the late reply - i was moving and didn't have internet ;/ yes the line is really there: root@smoakpi:/home/pi# ls /dev/spi* /dev/spidev0.0 /dev/spidev0.1 root@smoakpi:/home/pi# grep "spi" /boot/config.txt dtparam=spi=on – Marie Schreiber Jun 24 at 16:32
  • it should work then, but I've not got a PiZero to hand to test on, will try and get one next week to confirm. – olx Jun 27 at 13:56
  • that would be great since i don't have another pi zero at hand and cannot tell if it's just broken – Marie Schreiber Jun 28 at 16:17
  • Sorry for the delay, I've got a PiZero but it didn't have header pins, so waiting to get those sorted – olx Jul 17 at 13:08

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.