Hello,
I want to use analog pins A8 and A9 on aruino Mega for digital input, I declared both pins in input pull up mode. A9 works ok, but I get no response at all from A8. any ideas?
I want to use analog pins A8 and A9 on aruino Mega for digital input, I declared both pins in input pull up mode. A9 works ok, but I get no response at all from A8. any ideas?
B4X:
DoorOpenButton.Initialize(62,DoorOpenButton.MODE_INPUT_PULLUP) 'A8
DoorSensor.Initialize(63,DoorSensor.MODE_INPUT_PULLUP) 'A9
DoorOpenButton.AddListener("DoorOpenButton_Changed")
DoorSensor.AddListener("DoorSensor_Changed")
B4X:
private Sub DoorOpenButton_Changed (Status As Boolean)
Log (Status) 'no response at all
If Status = False Then UnLockDoor
End Sub
private Sub DoorSensor_Changed (Status As Boolean)
If Status = False Then
DoorSensorON = True 'door opened
Else
DoorSensorON = False 'door closed
LockDoor
End If
End Sub