Pi4J / pi4j-v2

Pi4J Version 2.0
Apache License 2.0
273 stars 57 forks source link

New plugin to add support for the new Raspberry Pi 5 #321

Closed FDelporte closed 8 months ago

FDelporte commented 8 months ago

The Raspberry Pi 5 has a new chip to interact with the GPIOs: RPI1. All info on https://www.raspberrypi.com/documentation/microcontrollers/rp1.html

Pi4J V2 uses LinuxFS and PiGpio to interact with the GPIOs, but these are not (fully) compatible with that RP1.

@alex9849 proposed via Slack on 20240114 the following solution: "I currently work on a plugin that allows Pi4J to use the gpiod library, which is currently the only way to access and control the gpio pins on the new Raspberry Pi 5. I've finished the DigitalOutputProvider and the native library. Everything compiles. (But I would need to modify the builder image for docker as some dependencies are missing). This is what I have written so far. It might work, but it is completely untested: https://github.com/alex9849/pi4j-v2/tree/feature/gpiod

piggy1130 commented 8 months ago

Hi Alex, thank you for your support for Raspberry Pi 5 with Java. I really want to control the GPIO with Java in Pi 5. Could you please let me know the step to install your code to let the GPIO control work in Raspberry Pi 5? I really appreciate any help that I could get. Thank you again!!

alex9849 commented 8 months ago

@piggy1130 Hi. Compiling the current version by yourself is a bit compilcated for now, as the official version of the builder that is automatically downloaded to build the project hasn't been updated yet and therefore can't compile the project.

But I think the implementation should be merged very soon.

piggy1130 commented 8 months ago

I see. Thank you so much for your immediate response and explaination :) I really appreciate it!! I will follow up the updates and thanks again for your help :)