Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4874

Java • Re: Pi4J does not work correctly with PI5 in a Java project

$
0
0
I changed the minimal example to use GPIO27 and rebuilt it using maven (no IDE). It runs OK, the LED on GPIO27 goes on and off once per second.

Code:

REGISTRY: [2] "I/O Registered Instances" <com.pi4j.registry.impl.DefaultRegistry>├─IO: "Press button" {button} <com.pi4j.plugin.gpiod.provider.gpio.digital.GpioDDigitalInput> {DIN-24}└─IO: "DOUT-27" {DOUT-27} <com.pi4j.plugin.gpiod.provider.gpio.digital.GpioDDigitalOutput> {DOUT-27}[main] INFO com.pi4j.util.Console -[main] INFO com.pi4j.util.Console - LED high[main] INFO com.pi4j.util.Console - LED lowetc.
Can you try it using the example instructions (maven from command line) from

Code:

https://www.pi4j.com/getting-started/minimal-example-application/

Statistics: Posted by neilgl — Sun Jan 12, 2025 10:14 pm



Viewing all articles
Browse latest Browse all 4874

Trending Articles