Shop OBEX P1 Docs P2 Docs Learn Events
COUNT Indefinatly — Parallax Forums

COUNT Indefinatly

debugdebug Posts: 2
edited 2006-11-05 06:34 in BASIC Stamp
Hello everyone, I am working my way through "Whats a Microcontroller" by Andy Lindsay, and I am trying to expand on a few of the projects that i've read. One being the button circuit. Ofcourse I just want to count button presses as it seems to be every newbs first idea; however the COUNT command seems to be limited for what I had in mind, which is to keep counting until my battery dies. for example:

'{$STAMP BS2}
'{$PBASIC 2.5}


total VAR Word

btn PIN 3


COUNT btn, 5000, total

DEBUG ? total

this only last 5 seconds, how could I do it indefinatly, I assumed that looping it would do the trick but when I did that I lost my button presses from the previous loop. At any rate... thanks for checking on my post.

-Jason

Comments

Sign In or Register to comment.