Shop OBEX P1 Docs P2 Docs Learn Events
combining the button command with a timer — Parallax Forums

combining the button command with a timer

ArchiverArchiver Posts: 46,084
edited 2003-03-22 00:14 in General Discussion
I'm working on a coin-operated project with an attract mode....that
is, if no one drops a quarter in the slot (which is run with the
BUTTON function) within 5 minutes, the program needs to branch to a
different routine.
Right now, I'm using code something like this:

for timer1 = 1 to 10
for timer2 = 1 to 50000
[noparse][[/noparse]button statement goes here, which starts a 'run']
next
next
[noparse][[/noparse]5 minutes is up, go to attract-mode routine and then do this again]

This is the only way I can think of (and it works), but I'm curious to
know if there is any other way to accomplish this....

Thanks,
--Alex
Sign In or Register to comment.