Replies: 1 comment
-
dear @molorane, can you please add this dependency to your pom.xml?
It would also make it easier to assist if you could provide the loaded platforms and providers. A helper method to do this is documented on https://github.com/Pi4J/pi4j-example-minimal/blob/main/src/main/java/com/pi4j/example/MinimalExample.java#L101 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I implemented a simple code to turn on and off a PIN. I used two channel relay to test whether the pins does change state. However, nothing happens. But , when I run a python script without changing the connections, the pins does turn on and off. Please help. I followed this guide https://github.com/Pi4J/pi4j-examples/blob/master/src/main/java/com/pi4j/example/gpio/digital/output/DigitalOutputExample.java
The code does nothing but on the log/console I see the following
<> [@DOUT-20 "DOUT-20" (#20)] STATE:[HIGH -> SLOW]
<> [@DOUT-20 "DOUT-20" (#20)] STATE:[LOW-> HIHG]
which to me implies it should work.
When I run this python
`import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(20, GPIO.OUT)
GPIO.output(20, GPIO.LOW)
time.sleep(5)
GPIO.output(20, GPIO.HIGH)`
My code is here on Github : https://github.com/molorane/raspberrypi-gpo-pin
It's a simple spring-boot maven project running on java11. I installed java11 on the raspberrypi and i run the springboot build artifact on
commandline on the rapsberrypi
Please help, what am I doing wrong.
Beta Was this translation helpful? Give feedback.
All reactions