pi4j v2, Raspbbery Pi 4, and PIGPIO ERROR: PI_INIT_FAILED; pigpio initialisation failed



  • Hi,

    New to the Pi and to Pi4J. I'm trying to create a really basic project in Kotlin (with JDK 11) which just sounds a buzzer, but I get the following error:

    [main] WARN com.pi4j.library.pigpio.impl.PiGpioNativeImpl - PIGPIO ERROR: PI_INIT_FAILED; pigpio initialisation failed
    

    I know that I have pigpiod installed and running on my machine (sudo pigpiod -v returns 78, and a simple python project works fine).

    My repository is at https://github.com/v79/RPI-LightHarp and I'm creating the DigitalOutput for the buzzer like this:

    val pin1OutConfig = DigitalOutput.newConfigBuilder(pi4J)
                    .id("buzzer1")
                    .name("Buzzer 1")
                    .address(24)
                    .shutdown(DigitalState.LOW)
                    .provider("pigpio-digital-output")
     val buzzer1 = pi4J.create(pin1OutConfig)
    

    Any ideas what I've missed?



  • Finally managed to build the example project, and it fails with the same error.


Log in to reply