element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 PiRack problem
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Raspberry Pi requires membership for participation - click to join
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 11 replies
  • Subscribers 666 subscribers
  • Views 2389 views
  • Users 0 members are here
  • piface_digital
  • raspberry_pi
  • raspberrypi
  • raspberryp-pi
  • pirack
  • piface
Related

PiRack problem

Former Member
Former Member over 11 years ago

I've got the PiRack yesterday and I've already tried to connect few things, including PiFace, LedBorg and ribbon cable to breadboard with temperature sensors connection. BUT. all of them worked without external power supply (both at once and separately tested), except for the PiFace! Even if only the PiFace is connected alone via the PiRack, it doesn't seem to be responding to Python commands...

To be on the safe side, I've swapped the jumpers from external to Pi power supply (no using external power at the moment at all), didn't touch the ISP jumpers at all (they are in default out-of-the-box positions.

Does the PiFace need an external power supply attached to the Pirack to be working?

  • Sign in to reply
  • Cancel
Parents
  • smythec
    smythec over 11 years ago

    Hi,

     

    For the sake of completion we now understand the issue and can provide the various solutions for when using a PiRack to link one or more PiFace boards to the R-Pi..

     

    When shipped the PiRack has the set of Jumpers J1/J2, J3/J4, J5/J6 and J7/J8 set as either 'Default SPI CE' or 'Swapped SPI CE Lines'. The documentation accompanying the PiRack states that the SPI CE lines do not need swapping i.e. implying that they are set as 'Default SPI CE'.  If that was the case then the associated initialisation call in any Python code that is expected to drive the PiFace would have the line 'pfio.init()' - assuming the corresponding import assigns the module to the object identifier 'pfio'.

     

    Unfortunately, the PiRack appears to be shipped with the J1/J2 etc. jumpers configured as 'Swapped SPI CE Lines'.  Hence the resulting 'pfio.init()' call results in the report of NO PiFace being detected.  This can be resolve by one of two ways:

     

    1) Swap ALL the J1/J2, J3/J4, J5/J6 and J7/J8 jumper settings on the PiRack back to 'Default SPI CE';

     

    OR

     

    2) Change the 'pfio.init()' call to 'pfio.init(True,0,1)'.  The 'pfio.init()' call is the same as writing 'pfio.init(True,0,0)'.  The first parameter (default=True) sets the inilisation of all boards to 'True', the second parameter is the SPI bus and the third is the chip_select value. It is the chip_select value that must be consistent with the J1/J2, etc. jumper settings.

     

    The doumentation concerning the init() and other PiFace API calls is supplied in the 'pifacedigital.py' module.

     

    When the PiFace is connected directly to the R-Pi i.e. without the use of a PiRack, then the Python code must use the call 'pfio.init()' otherwise the PiFace will not be detected.

     

    One final point is that when using the PiRack is ESSENTIAL that you download and use the latest set of code libraries for the PiFace. If you use only the code link provided in the PiFace (i.e. to http://pi.cs.man.ac.uk/download/install.txt) then you will not be able to control the individual PiFace boards linked through the PiRack. You should download the latest 'pifacedigital' and 'pifacecommon' code modules from the R-Pi GitHub at: 'https://github.com/piface'.

     

    If only one PiFace is linked to the PiRack, the. as long as the PiRack jumpers are set correctly AND the jumpers J1/J2 on the PiFace are set to identifiy the PiFace card as '0' then the PiFace will be correctly identified and driven if you use the original code libraries.

     

    Colin S.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • stukerr
    stukerr over 11 years ago in reply to smythec

    Hi Colin,

     

    Thanks for putting the tips up - I have followed your instructions, updates my code libraries and am using option 2 above - however when I connect 2 PiFaces' to the PiRack when I address the first board, it actually does what I want on both boards, and when I try and address the second I get the error "pifacedigitalio.core.NoPiFaceDigitalError: There is no PiFace Digital with hardware_addr 1" - any ideas where I might be going wrong?

     

    Many thanks,

     

    Stuart

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • stukerr
    stukerr over 11 years ago in reply to smythec

    Hi Colin,

     

    Thanks for putting the tips up - I have followed your instructions, updates my code libraries and am using option 2 above - however when I connect 2 PiFaces' to the PiRack when I address the first board, it actually does what I want on both boards, and when I try and address the second I get the error "pifacedigitalio.core.NoPiFaceDigitalError: There is no PiFace Digital with hardware_addr 1" - any ideas where I might be going wrong?

     

    Many thanks,

     

    Stuart

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • smythec
    smythec over 11 years ago in reply to stukerr

    Stuart,

     

    What versions of the PiFace Digital software libraries (Core and Common) are you using?

    What are the J1-J8 addresses assigned to the cards and what order are the cards on the PiRack?

     

    Colin S.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • stukerr
    stukerr over 11 years ago in reply to smythec

    Hi Colin,

     

    Thanks for your response, my pifacedigitalio is version 3.0.4 and pifacecommon is 4.0.0

     

    In terms of jumper settings, if i'm honest i'm more of a software kinda guy so i've just attached an image of the board setup, but I am using it with the pfio.init(True,0,1) [as that seemed to be the only way it would work]. The 2 PiFace cards are the first and second in the rack and there is nothing else conntected.

     

    Thanks again,

     

    Stuartimage

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • smythec
    smythec over 11 years ago in reply to stukerr

    Stuart,

     

    We have had problems with the set of libraries you are using but you should be able to get the boards working.

    You need to check that the J1-J2 jumpers on each of the PiFace Digital are set as '00' and the other as '01' (this ensures each board s addressed uniquely).

    I suspect they are both in the '00' setting hence the clash.  If you make the change to '01' then the clash should be avoided.

     

    We have a better description of how to set everything up on the Project at: LED Count Game Instructions

    I strongly suggest you  revert to the pfio.init(True,0,0).

     

    Let me know how you get on.

     

    Colin S.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • stukerr
    stukerr over 11 years ago in reply to smythec

    Hi Colin,

     

    Following the PiRack jumper configuration images in the LED game project and reverting to pfio.init(True,0,0) - many thanks for your assistance.


    Best wishes,


    Stuart

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • dhaggar
    dhaggar over 10 years ago in reply to smythec

    Hi Colin,

     

    Is there any update on this?

    pifacecommon and pifacedigitalio look like they have not been updated since late last year.

     

    Thanks

    Dallas

    • 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