Hi i want to build an application which listens to state changes of a gpio pin
on a raspberry pi
. How can i create a java application that never terminates but does nothing but listen. The listening is done by the handleGpioPinDigitalStateChangeEvent()
from https://pi4j.com/1.2/usage.html
Now i’m using a empty while(true)
loop in the main. I want to replace it to improve the performance because it’s running on an older raspberry pi.
Thank you guys!