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 8541 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
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    Okay. I run ure sample code, no output. Reinstalling Rasbian was my first try of troubleshooting.

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

    Did you press switch 0? Perhaps your switch is broken? Try connecting the ground pin and pin 0 with a wire (a paperclip will do). What happens then?

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

    Hey, i think you mean sw1 / input0, but i also try all the other switches and as i said in a earlier post "But simple polling on a button works fine. So buttons and leds are working...".  So the hardware should be fine?!. Strange that I seem to be the only one with this behavior image

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

    Hello Thomas,

    I have my SD card inserted and tested in a different RPi with another PiFace. The error is thus definitely somewhere in the software configuration!

    I'm going to make the Raspian completely new and write down step by step what I did. Perhaps you notice what's wrong or missing.

     

    Thanks for your help so far!!

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

    Sounds like a good idea. Hopefully we can get to the bottom of 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

    Okay that's exactly what I did, no more and no less!

     

     

    • Downloading 2013-09-10-wheezy-raspbian from raspberrypi.org
    • Writing Image on SD Card with win32 disk imager (v0.9)
    • First boot
    • Enable boot to desktop
    • Reboot
    • Connect via WinSCP
    • Copy common 3.1.1 and digitalio 2.1.0
    • Install common (sudo dpkg –i python3-pifacecommon…)
    • Reboot
    • Install digitalio (sudo dpkg –i python3-pifacedigital…)
    • Reboot
    • Lunch IDLE3
    • Select  / usr/share/doc/python3-pifacedigitalio/examples/presslights.py
    • Run F5
    • Press the Buttons

     

    Nothing happens. Still the same sh** :-( I'm desperate ...

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

    It might be somethig to do with IDLE (I've never used it). Try running the program from the command line (xterm or lxterminal).

     

    $ python3 /usr/share/doc/python3-pifacedigitalio/examples/presslights.py

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

    image yeah! That's it. Hours that I have employed you and then such an error.. big thanks!

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

    Hi i have a piface all the pins light up on override 1-7

    The piface will not recognized import piface.pfio as pfio

    most programmes i have run come up with syntex error

    i conected a door closer to the pin ligths up it works but relay does not swiitch

    i will do fresh install piface already loaded but it has no wifi installed

     

    any help with this it sounds a bit the same as yours

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

    Are you using the most up-to-date libraries? You can install them with:

     

    $ sudo apt-get update && sudo apt-get install python{,3}-pifacedigitalio

     

    Examples on how to use pifacedigitalio can be found here: http://piface.github.io/pifacedigitalio/example.html

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

    Are you using the most up-to-date libraries? You can install them with:

     

    $ sudo apt-get update && sudo apt-get install python{,3}-pifacedigitalio

     

    Examples on how to use pifacedigitalio can be found here: http://piface.github.io/pifacedigitalio/example.html

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

    Hi Thomas,

     

    I've been trying to get my piFace working.  I've been able to download and launch the piface-emulator.  Works fine.

     

    However I'm trying to run a simple python program.  I think it's a sample but I renamed it a couple of days ago and forget which it is.

     

    from time import sleep
    import piface.pfio as pfio
    pfio.init()
    while(True):
        pfio.digital_write(0,1) #turn on
        sleep(1)
        pfio.digital_write(0,0) #turn off
        sleep(1)
    I got a strange syntax error in pfio when I ran this from IDLE:
        print "%s %s" % (__pfio_print_PREFIX, text)    <--- this errors out as a syntax error
        print("{0} {1}").format(__pfio_print_PREFIX, text)  <--- I modified it to ths and it seems to accept the line
    Getting past that error I now get:

    Traceback (most recent call last):

      File "/home/pi/piface/python/myPiface.py", line 2, in <module>

        import piface.pfio as pfio

      File "/home/pi/piface/python/piface/pfio.py", line 13, in <module>

        import spi

    ImportError: No module named spi

    So, I'm missing something but, due to my ignorance of Linux I'm at a loss.  Shouldn't spi be included in the distro? oris this somethimg more fundamental I should have.
    Thanks for any help...
    Lou

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

    Are you using the most up-to-date libraries? You can install them with:

     

    $ sudo apt-get update && sudo apt-get install python{,3}-pifacedigitalio

     

    Examples on how to use pifacedigitalio can be found here: http://piface.github.io/pifacedigitalio/example.html

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

    YES!  Thanks Thomas, that worked.

     

    A quick question, in python, when I import a library, do I have to specify a directory or are all libraries centrally located?

     

    Thanks again for your help, now I can get started :-)

     

    Lou

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

    All Python modules are usually installed somewhere in /usr/lib/python* but Python will check all of the locations in sys.path. Here is some more info: http://docs.python.org/3.2/tutorial/modules.html#the-module-search-path

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

    Whoops, spoke too soon...

     

    Edit:

     

    I went back and tried to run my original program, still failed on spi  library. 

     

    I simply modifed it to use pifacedigitalio and it came together so all is well. 

     

    Is piface.pfio an older or somehow different library with the spi library performing some special communications?

     

    Again, thanks for your help and the url for the module-search-path.

     

    Lou

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

    pifacedigitalio is the new library. piface.pfio is the older (2012) library.

     

    You can find all of the official PiFace software here: https://github.com/piface

    • 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