1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

B4J Question How to use 2 PiFace2 with Raspberry

Discussion in 'B4J Questions' started by Jaume Guillem, Aug 21, 2019.

  1. Jaume Guillem

    Jaume Guillem Member Licensed User

    I am trying an application where two PiFace2 cards are needed.
    The pins that assign the number are clear on the card, but I can't get the second one to work.

    With one card I use:

    Dim controller1 As GpioController
    Dim input0 As GpioPinDigitalInput
    Dim Output0 As GpioPinDigitalOutput

    controller1.InitializePiFace (
    input0.Initialize (
    Output0.Initialize (
    This works perfectly, but if I try to assign more inputs or outputs

    input8.Initialize ("sw8", 8)
    Output8.Initialize (8, False)

    they do not accept it.

    Also with a single card, but assigning bus 1 (to test) does not work either
    controller1.InitializePiFace (0x40,1)
    ( having the jumpers correctly to bus 1 on the card).

    It seems that only ONE card can be used AND on bus 0.

    Anyone know how to work with both cards?

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice