Hi to all
With latest jPi4J the Sub pin_StateChange it's never raised.
If i cech with a timer periodically the state of the same pin and log state this is correctly read (false o true)
Why?
Tanks
Private IOc As GpioController
Private O1, O2, O3, O4, O5 As GpioPinDigitalInput
..........
..........
IOc.Initialize
O1.Initialize("O1", 18)
...........
...........
Sub O1_StateChange(State As Boolean)
If State = False Then Update
End Sub
The pinout the ComfilePI (personalized hardaware) is equal to Raspy 3 (rename GPIO name).
The GPIO18 corrrespondes to GPIO1
If i use 18 as pin the state is properly read but the StateChange not work, while if i use 1 as pin
work also StateChange.
Why?
It's strange.
I think that the state changed listeners are based on hardware interrupts (it is implemented inside Pi4J library). Maybe this pin doesn't support this feature.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.