
Originally Posted by
MrRoboto
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.
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
The pauseus gives time to debounce switch and checks again, if true then execute.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks