element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum PiFace Problems
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 78 replies
  • Subscribers 676 subscribers
  • Views 8505 views
  • Users 0 members are here
  • raspberry_pi
  • piface
  • raspberry_pi_accessories
Related

PiFace Problems

keithtowns
keithtowns over 12 years ago

Am I missing something? I have two PiFace and 3 Raspberry Pi. I followed the instructions the get the PiFace working but have yet to succeed. I have tried the image provided as well as updating an existing Raspian image to no avail. I have also tried all my Pi and the two PiFace in all the combinations. I almost gave up but also tried a different power supply and SD card. None of the above got the emulator to switch on the LEDs and I could not do it through Python. Any ideas? I've spent hours on this, please tell me I've missed something. Thanks.

  • Sign in to reply
  • Cancel
Parents
  • Former Member
    Former Member over 12 years ago

    Keith, you are not alone. The 'documentation' with the piface is worse than useless. I particularly like the typo on page 2 of the 'instructions' (etc/ which should be /etc/) and that if the emulator fails (I can't get it to work – ends with 'segmentation fault') the 'instructions' that follow are, again, useless. I will get it working in the end, but no thanks to the fools at man.ac.uk. How difficult would it have been to provide basic instructions in the box? Good luck with it - I'll reply back when I've finished arm-wrestling with it and got it doing something (I have a job in mind).

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    ... not sure if urls are allowed here - if they are, here's some documentation for piface ...

     

    https://docs.google.com/folder/d/0B-UAZ9CyJCLGQjJ3RDlqa2pqaDg/edit?pli=1

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • keithtowns
    keithtowns over 12 years ago in reply to Former Member

    Wow, brilliant (the google docs). Lot's of reading, I'll give it another try.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to keithtowns

    ... if it helps, here's what I found useful to go alongside the google docs (see above) ...

     

    https://github.com/thomasmacpherson/piface/blob/master/README.md

    All the piface software with quite a good explanation of how to download and what to download  (useful if downloading the man.ac.uk 4GB SD card image is an issue – which it probably is if you're not plugged into the HE backbone).

     

    https://projects.drogon.net/raspberry-pi/wiringpiface/

    Wiringpiface - some alternative software which is quite well explained.

     

    https://projects.drogon.net/raspberry-pi/wiringpi/the-gpio-utility/

    … and from the same place a gpio utility which I found a good starting point for simply turning lights on etc. The proviso with the two links above is that there are wrinkles and gotchas here and there (but I found it worth persevering).

     

    And lastly, 'documentation' (almost) for the RPi gpio pins

    http://elinux.org/Rpi_Low-level_peripherals

     

    What I didn't find useful, in fact the biggest time-waster, was the RPi Foundation forum.

     

    Nevertheless, I have got the first part of my project working now - when its above 20c in the conservatory a fan turns on to blow warm air around the house (all done with RPi, sensors and a relay). In the process, I've come to realise that piface (and the gertboard) are hardware 'solutions' (to stop school kids from frying their RPis) and that an easy-to-use software companion simply doesn't exist. That's the frustrating part, and one which will most likely stymie the growth of the idea that got me interested - 'physical computing'.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    Hi,

    I maintain and develop the software for PiFace (for the moment at least). The GitHub is pretty much the goto with regards to information from me since it's kept up to date. Is there anything in particular I can help with? You said that PiFace isn't an easy-to-use software companion? Apart from installation, what problems are there? I'd very much like to improve it so your input is invaluable!

     

    As for installation, it's not perfect. We're working on getting a more streamlined method. Are the instructions on the GitHub clear? Can I make them any better?

     

    Oh and just for reference, here is everything PiFace: https://github.com/thomasmacpherson/piface

     

    Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    Hi,

     

    I've installed everything according to the PiFaceDigital_Get_Started_140213v1.pdf and commented out #blacklist spi-bcm2708, etc...

     

    sudo ... piface-emulator says: "Could not connect to the SPI module (check privileges)..."

     

    What do you think is going on and how might I fix this?

     

    Thanks,

     

    Adrian

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    The PiFace software talks to the board through the SPI interface device. All devices in Linux are presented as files in /dev/ and the SPI interface is presented as /dev/spidev0.0 and /dev/spidev0.1. That error is because PiFace is struggling to connect to the SPI device. During testing this was most likely because the user pi did not have the permissions to access the file, hence the check privileges suggestion. Or the file did not exist, meaning that the Linux kernel hasn't created it because the SPI kernel module wasn't loaded correctly.

     

    To figure out which, let's take a look at the SPI files in /dev, run the command:

     

    $ ls -l /dev/spidev*

    crw-rw----T 1 root spiuser 153, 0, Jan   1   1970  /dev/spidev0.0

    crw-rw----T 1 root spiuser 153, 1, Jan   1   1970  /dev/spidev0.1

     

    This will long-list all of the spidev files in /dev.

     

    If the ls command returns nothing then Linux probably hasn't loaded the SPI module. Try listing all the currently loaded modules with:

     

    $ lsmod

     

    and see if spi_bcm2708 is there. If it isn't try loading it with:

     

    $ sudo modprobe spi_bcm2708

     

    and then check the SPI files again. If that works then double check that you have commented out the blacklist command in /etc/modprobe.d/raspi-blacklist.conf. Make sure you edit it as root! Also, make sure you've fully updated Raspbian (sudo apt-get update && sudo apt-get upgrade).

     

     

    If the ls command returns something like the above then the Linux kernel is doing it's job correctly. See the first column of output from ls -l (the crw-rw----T bit)? That describes user permissions. The third and fourth columns describe the owner and group, respectively. The output needs to be exactly as I have above otherwise only root will be able to access the SPI interface. Try running the spidev-setup script again from the scripts/ directory in piface and reboot.

     

    If non of this works, get back to me and I'll see what else I can do.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    Thanks for the quick response...

     

    There's "No such file or directory" spidev* in /dev

     

    $ lsmod shows spi_bcm2708     4815     0

     

    I note that the PiFaceDigital_Get_Started_140213v1documentation for the raspi-blacklist.conf file and $ sudo modprobe spi-bcm2708 shows a hyphen in the name while your message and lsmod show an _

     

    I tried $ sudo modprobe with both the - and the _ but still no spidev

     

    TIA

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • imac
    imac over 12 years ago in reply to Former Member

    Hi

    Not sure if appropriate but I downloaded new version of  WHEEZY came out dated 9th Feb and found that it fixed a few of the problems I had.

    Its hard keeping up with these updates.

    Feel the whole of the Raspberry Pi project suffers from this.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    Are you sure you are using the latest version of Raspbian?

     

    Also, have you tried updating the firmware on your Raspberry Pi? Follow the instructions here: https://github.com/Hexxeh/rpi-update

     

    modprobe translates the hypen to an underscore, I think. So it doesn't matter which.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    Are you sure you are using the latest version of Raspbian?

     

    Also, have you tried updating the firmware on your Raspberry Pi? Follow the instructions here: https://github.com/Hexxeh/rpi-update

     

    modprobe translates the hypen to an underscore, I think. So it doesn't matter which.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    sudo apt-get upgrade seems to have done the trick!

     

    I didn't do the rpi-update but I will the next time I run into a mystery.

     

    Thank you so much, Thomas and everyone on this list!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • keithtowns
    keithtowns over 12 years ago in reply to Former Member

    Hi Thomas

     

    Many thanks for your posts. I have to put aside a day to do this so I'll let you know how I get on. My target is to get the PiFace working so my daughter can program it through Scratch to control a set of traffic lights (3 LEDs) when a Matchbox car approaches (reed switch and magnet on the car).

     

    But I've got to get it going first!

     

    Cheers

     

    Keith

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • keithtowns
    keithtowns over 12 years ago in reply to keithtowns

    Hello All

     

    I have just spent my Sunday morning trying to get this working again.

     

    Using 512Mb Pi and Transcend 8Gb SD card:

     

    1. Downloaded latest Raspian 2013-02-09-wheezy-raspbian
    2. Updated Firmware https://github.com/Hexxeh/rpi-update
    3. Followed instructions in http://www.element14.com/community/servlet/JiveServlet/previewBody/53057-102-1-267727/PiFaceDigital_Get_Started_140213v1.pdf
    4. Did another sudo apt-get update && sudo apt-get upgrade

     

    When I run the emulator it can see the PiFace but no LED's or relays change.

     

    This is not getting my daughter very interested in computing.

     

    Any help will be really apreciated.

     

    Thanks

     

    Keith


    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to keithtowns

    Hi Keith,

    Does the board work when just using Python? Try opening a Python shell and talking to PiFace:

     

        $ python
        >>> import piface.pfio as p
        >>> p.init()
        >>> p.digital_write(1, 1)

     

    What error does that produce?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • keithtowns
    keithtowns over 12 years ago in reply to Former Member

    Hi Thomas

     

    I tried your code in a Python shell from a LXTerminal and from Python 2.7.3 Shell.

     

    No errors were reported when I typed in each of the lines but I guess this was going to switch on an LED or relay? Neither happened.

     

    Thanks for your help so far.

     

    Keith

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • dgmcneil
    dgmcneil over 12 years ago in reply to keithtowns

    Hi Keith, did you ever get you PiFace to work?

     

    I spent two days struggling with this.  I found it hard to find documentation and I could have saved myself two days of trouble-shooting had I just had access to a schematic.

     

     

    My PiFace was shipped without a jumper on JP7.  The absence of JP7 disables the 5 V rail for the outputs so there was no lights, no relay click.  Adding JP7 made the PiFace work as advertised.

     

    While I'm typing I may as well add that I'm disappointed that the designer of the PiFace didn't make the unused IO ports on the Raspberry Pi available on the board.  This limits what would have otherwise been a very nice addition to the Pi.

     

    Dave

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • keithtowns
    keithtowns over 12 years ago in reply to dgmcneil

    Hi Dave

     

    No my PiFace is still not working and both of them have a jumper 7 installed.

     

    Thanks anyway

     

    Keith

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mrbuzzcut
    mrbuzzcut over 12 years ago in reply to keithtowns

    Did you get any error messages in the terminal window when you ran the emulator?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • keithtowns
    keithtowns over 12 years ago in reply to mrbuzzcut

    Hi Jeff

     

    No errors, the emulator window opens and says piface detected but nothing works. In the terminal window the cursor waits and returns to root@raspberrypi:~# once the emulator has been closed.

     

    Cheers

     

    Keith

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mrbuzzcut
    mrbuzzcut over 12 years ago in reply to keithtowns

    PiFace detected...that's a start. Did you click the override button?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube