B4J Question StateChange not work (Raspberry 3 compute module)

micro

Well-Known Member
Licensed User
Longtime User
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
 

micro

Well-Known Member
Licensed User
Longtime User
Can you post your code?
Simply
B4X:
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

O1_StateChange it's never raised
 
Upvote 0

micro

Well-Known Member
Licensed User
Longtime User
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.
 
Upvote 0
Top