balanga
Posts: 118
Joined: Sat Aug 23, 2014 6:56 pm

No PiFace Digital board detected

Wed Oct 31, 2018 10:01 pm

I've just bought a Piface Digital2 and am haiving problems getting it to do anything....


I've tried following as many guides as I could find but when running the sample blink.py

Code: Select all

from time import sleep
import pifacedigitalio


DELAY = 1.0  # seconds


if __name__ == "__main__":
    pifacedigital = pifacedigitalio.PiFaceDigital()
    while True:
        pifacedigital.leds[7].toggle()
        sleep(DELAY)

I get:-
root@raspberrypi:/usr/share/doc/python3-pifacedigitalio/examples# python3 blink.py
Traceback (most recent call last):
File "blink.py", line 9, in <module>
pifacedigital = pifacedigitalio.PiFaceDigital()
File "/usr/local/lib/python3.5/dist-packages/pifacedigitalio/core.py", line 82, in __init__
self.init_board()
File "/usr/local/lib/python3.5/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).
How do I tell if this is due to a faulty PiFace Digital or a misconfiguration on my part?

Andyroo
Posts: 3776
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: No PiFace Digital board detected

Thu Nov 01, 2018 12:28 am

Looking at the web page http://www.piface.org.uk/products/piface_digital_2/, a three things stand out:

a) Jumpers jp1 and jp2 seem to set an address. The docs online do not cover them so it may be worth checking with https://www.farnell.com/datasheets/1881551.pdf to see if these are set correctly. You should have jumpers on pins 1 & 2 on jp1 and jp2
b) The web page dates from 2013 and says it’s compatible with Raspberry Pi models A+, B+ and Raspberry Pi 2 - it may not work with newer boards.
c) GUTHUB hosts an emulator https://github.com/piface/pifacedigital-emulator - it maybe worth trying that to see if the software has installed correctly...
Need Pi spray - these things are breeding in my house...

balanga
Posts: 118
Joined: Sat Aug 23, 2014 6:56 pm

Re: No PiFace Digital board detected

Thu Nov 01, 2018 10:24 am

Andyroo wrote:
Thu Nov 01, 2018 12:28 am
Looking at the web page http://www.piface.org.uk/products/piface_digital_2/, a three things stand out:

c) GUTHUB hosts an emulator https://github.com/piface/pifacedigital-emulator - it maybe worth trying that to see if the software has installed correctly...

Code: Select all

sudo apt-get install python3-pifacedigital-emulator
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3-pifacedigital-emulator

User avatar
DougieLawson
Posts: 35544
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: No PiFace Digital board detected

Thu Nov 01, 2018 10:47 am

You'd need to add the Jessie repos back into your Stretch system to get the PiFace stuff. It's not supported, it's appearing more and more like abandonware - for the apt-get stuff.

The support for all of the PiFace stuff is abysmal. Get everything you need from Github as that's more likely to work. https://github.com/piface
Note: Having anything remotely humorous in your signature is completely banned on this forum. Wear a tinfoil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

balanga
Posts: 118
Joined: Sat Aug 23, 2014 6:56 pm

Re: No PiFace Digital board detected

Thu Nov 01, 2018 8:16 pm

Not sure how to add repos or even how to tell if I'm using Jessie or Stretch....

Code: Select all

uname -a
shows:
Linux raspberrypi 4.14.71-v7+ #1145 SMP Fri Sep 21 15:38:35 BST 2018 armv7l GNU/Linux
Should I run?

Code: Select all

git clone https://github.com/piface

User avatar
DougieLawson
Posts: 35544
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: No PiFace Digital board detected

Thu Nov 01, 2018 8:19 pm

balanga wrote:
Thu Nov 01, 2018 8:16 pm
Should I run?

Code: Select all

git clone https://github.com/piface
Not quite. Because that won't work. You need to pick the gits below that directory that you need.
Note: Having anything remotely humorous in your signature is completely banned on this forum. Wear a tinfoil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

balanga
Posts: 118
Joined: Sat Aug 23, 2014 6:56 pm

Re: No PiFace Digital board detected

Fri Nov 02, 2018 12:00 pm

Is there any way to test a PiFace Digital2 physically? ie not using software....

I do notice a reading of 5V on my multimeter when connecting GND on the green inputs to 5V on the brown outputs on the diagram below:

http://www.piface.org.uk/products/piface_digital_2/

Is there any Linux cmd I can run to see if there is anything attached to the Pi?

balanga
Posts: 118
Joined: Sat Aug 23, 2014 6:56 pm

Re: No PiFace Digital board detected

Fri Nov 02, 2018 12:26 pm

It seems as though someone who had the same problem managed to fix it:-

https://github.com/piface/pifacedigitalio/issues/36

Not sure that I can follow the fix.....

User avatar
DougieLawson
Posts: 35544
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: No PiFace Digital board detected

Fri Nov 02, 2018 12:41 pm

It's got an MCP23S17 SPI chip on-board. I'll see if I can find a program that will test that by reading / writing some of the on-chip registers.

Watch this space ...
Note: Having anything remotely humorous in your signature is completely banned on this forum. Wear a tinfoil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

balanga
Posts: 118
Joined: Sat Aug 23, 2014 6:56 pm

Re: No PiFace Digital board detected

Fri Nov 02, 2018 2:24 pm

Many thanks.

balanga
Posts: 118
Joined: Sat Aug 23, 2014 6:56 pm

Re: No PiFace Digital board detected

Mon Nov 05, 2018 2:34 pm

It seems the problem was due to SPI.PY not being updated to the latest version.

Have things working properly now.

Return to “HATs and other add-ons”