Hello,
Can I set debounce time on a digital input?
John
Can I set debounce time on a digital input?
B4X:
Sub Process_Globals
Private controller As GpioController
Private pin0,pin1,pin2,pin3,pin4,pin5,pin6,pin7 As GpioPinDigitalInput
End Sub
Sub AppStart (Args() As String)
controller.InitializePiFace(0x40, 0)
pin0.Initialize("pin0",0)
pin1.Initialize("pin1",1)
pin2.Initialize("pin2",2)
pin3.Initialize("pin3",3)
pin4.Initialize("pin4",4)
pin5.Initialize("pin5",5)
pin6.Initialize("pin6",6)
pin7.Initialize("pin7",7)
StartMessageLoop
End Sub
Sub Pin0_StateChange(State As Boolean)
Log("Pin0 StateChange event: " & State)
End Sub
Sub Pin1_StateChange(State As Boolean)
Log("Pin1 StateChange event: " & State)
End Sub
Sub Pin2_StateChange(State As Boolean)
Log("Pin2 StateChange event: " & State)
End Sub
Sub Pin3_StateChange(State As Boolean)
Log("Pin3 StateChange event: " & State)
End Sub
Sub Pin4_StateChange(State As Boolean)
Log("Pin4 StateChange event: " & State)
End Sub
Sub Pin5_StateChange(State As Boolean)
Log("Pin5 StateChange event: " & State)
End Sub
Sub Pin6_StateChange(State As Boolean)
Log("Pin6 StateChange event: " & State)
End Sub
Sub Pin7_StateChange(State As Boolean)
Log("Pin7 StateChange event: " & State)
End Sub
John