Ver 2.0 pi4j is poor, nothing works. #232
Replies: 3 comments 2 replies
-
Pertaining to pi4j.dout not working. See discussion 225 to create the output pin via different steps relevant detail from 225 I believe the dout().create() creates the output pin with no operational provider. I did not see a means to add a valid provider using that pattern so I changed your code as seen below, the LED blinks and remains ON at completion. I did not have your logging class so I modified the code to use the console. Also, for my clarification, you refer to pin 16, which is BCM16, pin 36.
|
Beta Was this translation helpful? Give feedback.
-
So I've changed my source code:
and try to run as a root:
and it's not working again. Look that pigpio as bash tool and deamon works but from Java I got "PIGPIO ERROR: PI_INIT_FAILED; pigpio initialisation failed" and the exception was thrown. |
Beta Was this translation helpful? Give feedback.
-
I used the Minimal example steps to set up the environment. mkdir Example I updated the pom file. I think I had problems with 2.1.1. and moved past it some time back. My changes were
cd to package com.pi4j.example; import com.pi4j.; public class GettingStartedExample {
} cd ~/Example/pi4j-example-minimal cd to classes sudo java -classpath /home/pi/Example/pi4j-example-minimal/target/distribution/*:/home/pi/Example/pi4j-example-minimal/target/classes com.pi4j.example.GettingStartedExample ~/Example/pi4j-example-minimal/target/classes $ Tom |
Beta Was this translation helpful? Give feedback.
-
First of all, I have got original Raspberry Pi CM4 with updated Raspbian:
Linux device 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux
I've installed pigpio to control from bash simple output GPIO21 like this:
and it's working, led's flashing.
Now, I wanted to use Pi4J (the newest) so I've installed Java:
"Hello world" works.
Now I used sample: https://pi4j.com/documentation/io-examples/digital-output/
and create file:
and it's not working, Led isn't flashing.
no error during compilation and running, during running I got:
P.S.
Beta Was this translation helpful? Give feedback.
All reactions