Does anyone use the Button command from the book to get an input from a pin(on/off switch)?
Is there another way to do it ?
Printable View
Does anyone use the Button command from the book to get an input from a pin(on/off switch)?
Is there another way to do it ?
I suppose some people use it, 2 if then loops are easier to get to work though.
The pauseus gives time to debounce switch and checks again, if true then execute.Code:main:
If PortA.1 = 1 THEN
pauseus 500
If PortA.1 = 1 THEN
PortB.1 = 1
else
PortB.1 = 0
endif
endif
goto main