View: 7093|Reply: 4

pi4j v2 on Orange Pi 3 (Ubuntu)

[Copy link]

1

threads

1

posts

35

credits

Novice

Rank: 1

credits
35
Published in 2022-1-24 12:33:37 | Show all floors |Read mode
Edited by BS.orangepi at 2022-1-24 13:22

Hi!
I was writing a program that worked in Raspberry PI4 with UART and GPIO. The application is written in Java. The application coped with its functions.
Due to the difficult situation, it was decided to switch to Chinese analogues of single-board computers. According to the possibilities, I liked Orange Pi 3.
On the website (https://pi4j.com/about/new-in-v2 /) it is written that Orange Pi is supported.
According to the instructions, I installed pi4j v2 ( curl -sSl https://pi4j.com/v2/install | sudo bash)
I wrote a test application for flashing 1 LED to check the library. But during execution I see the following error:

Caused by: java.lang.UnsatisfiedLinkError: Pi4J was unable to extract and load the native library [/lib/aarch64/libpi4j-pigpio.so] from the embedded resources inside this JAR [/home/orangepi/CheckUart.jar]. to a temporary location on this system. You can alternatively define the 'pi4j.library.path' system property to override this behavior and specify the library path.
at com.pi4j.library.pigpio.util.NativeLibraryLoader.load(NativeLibraryLoader.java:170)
at com.pi4j.library.pigpio.internal.PIGPIO.<clinit>(PIGPIO.java:74)
at com.pi4j.library.pigpio.impl.PiGpioNativeImpl.gpioInitialise(PiGpioNativeImpl.java:91)
at com.pi4j.library.pigpio.PiGpio.initialize(PiGpio.java:146)

File "libpi4j-pigpio.so" not anywhere. Where can I find it?
What am I doing wrong?
Are there alternative ways to work with UART and GPIO in Java?

Sorry for my English.


0

threads

1

posts

6

credits

Novice

Rank: 1

credits
6
Published in 2022-2-11 16:56:27 | Show all floors
Unfortunately, your information is not correct, at the moment it says the following:

Other Platforms – Other platforms such as Odroid, BananaPi, NanoPi, OrangePi, etc. have been removed and will no longer be supported. The challenge with supporting these additional platforms is that Pi4J depends on the underlying WiringPi project and WiringPi ports for these other platforms is not well supported by the various SoC vendors or community. The various WiringPi ports for these other platforms are also inconsistent causing inconsistent features and functionality of Pi4J. Additionally, regression testing of bug fixes and new features in Pi4J is compounded with each additional supported platform.

I would also really like to use OrangePI for my Java projects, but at the moment I can't find a suitable framework for that.

0

threads

11

posts

57

credits

Registered member

Rank: 2

credits
57
Published in 2024-4-16 21:09:04 | Show all floors
Integrating Pi4J v2 on the Orange Pi 3 offers enhanced capabilities and compatibility, expanding the possibilities for GPIO control and interaction. With the right configurations and setups, users can leverage Pi4J v2 to efficiently manage GPIO pins, facilitating seamless communication with external devices and sensors. This integration streamlines development processes and opens doors for innovative projects, while ensuring accurate bookkeeping services for tracking expenses and financial records.

0

threads

70

posts

178

credits

Registered member

Rank: 2

credits
178
Published in 5 daybefore | Show all floors
Your passion for [topic] really bar pitti shines through in your writing.

0

threads

11

posts

30

credits

Novice

Rank: 1

credits
30
Published in 5 daybefore | Show all floors
Ensure that the library path specified by the pi4j.library.path system property is correctly Heardle set. You can define this property to override the default behavior of Pi4J and specify the location of the native library manually.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list