Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Piface Digital nt working in Buster #39

Open
patdelaney opened this issue Aug 29, 2019 · 7 comments
Open

Piface Digital nt working in Buster #39

patdelaney opened this issue Aug 29, 2019 · 7 comments

Comments

@patdelaney
Copy link

Any reads from the piface chip are all returning 0. I don’t know if it’s a kernel issue or what.

Has this been tested on Buster?

OS Version: | Raspbian GNU/Linux 10 (buster)
Kernel Version: | 4.19.66-v7+

@rexx-org
Copy link

rexx-org commented Jan 4, 2020

I have the same issue under Buster.
Looks like the suppliers have abandoned any support for the product :-( Might be a good idea in future to not buy anything from these people as they obviously don't care about supporting their customers.

@rfennell
Copy link

Might be useful to others...

I managed to get my PIFace working on Buster using Python on an old Raspberry Pi. I used Lite on a headless install, but I am sure it work on Full install too.

You have to install using PIP...

  1. Get PIP (PIP3 for Python3)
    sudo apt-get install python3-pip
  2. Get the libraries
    sudo pip3 install pifacedigitalio
    sudo pip3 install pifacecommon
  3. Make sure the SPI access is enabled to the IO (you get errors when you run the script if you miss this out)
    sudo sed -i 's/#dtparam=spi=on/dtparam=spi=on/' /boot/config.txt
  4. Reboot
    sudo reboot

To test it create a file mytest.py

from time import sleep
import pifacedigitalio as p
p.init()
while(True):
     p.digital_write(0,1) #turn on
     sleep(1)
     p.digital_write(0,0) #turn off
     sleep(1)

and run it
python3 mytest.py
one of LEDs should flash

@patdelaney
Copy link
Author

patdelaney commented May 24, 2020 via email

@hkeown
Copy link

hkeown commented Aug 28, 2020

Good evening @rfennell, @patdelaney ,

I've had the PiFace Digital (PFD) running on RPi 3B+ on Buster without any problem. I've now migrated to a Pi4.

In summary, the PFD now runs for a few hours and then hangs the system, killing the network in the process (although the network does recover after a period of time). To try and isolate the problem I've done a fresh install of Buster + latest install of python etc. I've included a snapshot of HTOP (running via an Ethernet terminal session) when the system hangs. The test program is a simple toggle_led.py, which I execute using the serial port using strace(). Using the serial port was to ensure that when the Ethernet connections dies, I still have access to the Pi. The strace output doesn't help much as I'm not sure what I'm looking for, is the strace output as expected? The syslog at the time of the stoppage at 13:43 doesn't indicate any related activity.

Any and all assistance will be appreciated.

[
PFD - Hangs3
PFD - Hangs2
PFD - Hangs1

](url)

@patdelaney
Copy link
Author

patdelaney commented Aug 28, 2020 via email

@hkeown
Copy link

hkeown commented Aug 30, 2020

Thank-you @patdelaney

It's a c completely fresh install from https://www.raspberrypi.org/downloads/ using the Raspberry Pi Imager for Windows.

Extract from the install script

` sudo apt-get update
sudo apt full-upgrade
sudo apt autoremove

sudo pip3 install pifacecommon
sudo pip3 install pifacedigitalio
`

Simple led toggle loop

`while(True):

 p.digital_write(7,1) #turn on
 sleep(1)
 p.digital_write(7,0) #turn off
 sleep(1)

`

Do you have any other debug functions or techniques for the PFD?

@tompreston
Copy link
Member

So it looks like pifacedigital works when you install it from pip.

Can someone make a merge request to fix the doc please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants