0

I need to create a project for the RPI3. It must control external devices, read signals from a coin acceptor and output the graphic of a videogame to a screen 1920x1080 px. I used Processing libraries (www.processing.org) for all the purposes but it renders the graphic very slow and without Open GL ES support (I think this is the main reason). I want to transfer from processing to LibGDX to complete the project and am selecting for a library for simple interaction with the GPIO. I have founded only Pi4J project but can not even run tests.

I get the next error message when I launch the first example of the Pi4J library on my RPI4B (Raspberry Pi OS 64bit):

/root/.jdks/liberica-11.0.18/bin/java -javaagent:/home/MGDSStudio/Software/idea-IC-223.8617.56/lib/idea_rt.jar=34803:/home/MGDSStudio/Software/idea-IC-223.8617.56/bin -Dfile.encoding=UTF-8 -classpath /home/MGDSStudio/GD/Tests/Pi4j/pi4j-v1/pi4j-example/target/classes:/home/MGDSStudio/GD/Tests/Pi4j/pi4j-v1/pi4j-core/target/classes:/root/.m2/repository/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1.jar:/root/.m2/repository/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0.jar BlinkGpioExample
<--Pi4J--> GPIO Blink Example ... started.
Mar 08, 2023 7:27:37 PM com.pi4j.util.NativeLibraryLoader load
SEVERE: Unable to load [libpi4j] using path: [/lib/raspberrypi/dynamic/libpi4j-aarch64.so]
java.io.FileNotFoundException: File /lib/raspberrypi/dynamic/libpi4j-aarch64.so was not found in classpath.

I use liberica jdk-11. What is wrong with it or my SBC? I have tested also on my Khadas Vim3 pro (Ubuntu 20.04 64 bit) but without success.

  • There seems to be a 32- versus 64-bit mismatch. Did you compile with the right version and running it with a similar version? – Frank Mar 09 '23 at 08:04
  • @Frank, I thought also that the problem is in the OS versions. But today I saw some youtube videos and no one compiles the projects direct on the Pi. Every compiles the project on a normal desktop and than launches the executable jar file on the pi. Maybe this is the trouble? The project must be compiled external and launch on the pi as a jar but can not be launch direct from the intellij idea. What do you think about it? I use 64 bit raspbian for the development and for the tests. – Alexander Gorodilov Mar 09 '23 at 08:27
  • That could indeed be the problem. Did you check this tutorial about uploading code from IntelliJ IDEA and run/debug it on a RPi? https://pi4j.com/getting-started/crowpi/develop-with-intellij/ – Frank Mar 10 '23 at 07:08
  • @Frank, I have launched successfully the simple example as Gradle project. Thanks, but I have not understood how could I make this. This library is not so simple as processing embedded IO library, but I think more powerful. – Alexander Gorodilov Mar 19 '23 at 07:47

0 Answers0