MrRoboto
- 28th January 2009, 23:13
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 ?
Archangel
- 29th January 2009, 02:23
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.
main:
If PortA.1 = 1 THEN
pauseus 500
If PortA.1 = 1 THEN
PortB.1 = 1
else
PortB.1 = 0
endif
endif
goto main
The pauseus gives time to debounce switch and checks again, if true then execute.
Powered by vBulletin® Version 4.1.7 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.