I would like to test the status (off/on - 0/1) of an output Pin without creating an additional variable as a flag. Is there a way of performing an action based on the status of an output Pin?
The following works on an input Pin:
But this does not work as soon as the Pin becomes an output:
How (or can) I do what I would like to do? Or should I even be trying? Is there another way?
The following works on an input Pin:
Code:
#PICAXE 18m2
Do
SerTxd ("B.3 = ",#PinB.3,cr)
If PinB.3 = 1 Then SerTxd ("B.3.x = ",#PinB.3,cr,cr)
EndIf
Pause 3000
Loop
But this does not work as soon as the Pin becomes an output:
Code:
#PICAXE 18m2
Do
SerTxd("B.3 = ",#PinB.3,cr)
High B.3
If PinB.3 = 1 Then SerTxd("B.3.x = ",#PinB.3,cr,cr)
EndIf
Low B.3
Pause 3000
Loop