I am using a first-generation Raspberry Pi and developed a Java program in 2018 that utilized GPIOs with pi4j 1.4. After a recent SD card failure, I am struggling to find the previous versions of the required libraries, specifically a compatible version of libwiringPi.so.
While attempting to reprogram, I can’t find a working libwiringPi.so version earlier than 2.6.0, which is apperently not compatible with my setup. My previous working version might have been obtained from a now-inaccessible source (previously wiringpi.com).
When trying to use version 2.6.0 or later, I encounter the following error:
java.lang.RuntimeException: Unable to open GPIO direction interface
for pin [5]: No such file or directory
I’ve tested all GPIO numbers (0-31) with no success, even running the program with sudo to avoid permission issues.
Here is a simplified example:
val gpio = GpioFactory.getInstance()
gpio.provisionDigitalOutputPin(pin, "MyPin", PinState.HIGH)
In addition I have tried another provider:
GpioFactory.setDefaultProvider(RaspiGpioProvider(RaspiPinNumberingScheme.BROADCOM_PIN_NUMBERING));
But to the same end.
Does anyone know how to make the Raspberry Pi 1 work with pi4j? Any help with locating an older libwiringPi.so or configuring the newer versions to work would be greatly appreciated.