marzan
Senior Member
Hi everyone. Haven`t been here for a while. Had a few health issues. Getting old SUCKS!.
Anyway, I am working on a new project. The basic idea is to use a touch pad to set off a beeper when touched. That part is working. the part I need help with is I want to run a program in parallel that if the touchpad isn`t touched within 5 minutes that the beeper is set off to remind you that the unit is still switched on. Also can the time be reset to zero if the pad is touched?
I was thinking that the enable time function might be able to be used, with the 2 programs running in parallel. Is that the right way to head, or is there a better way?
Here is the code that runs the touchplate, I am using an 08M2:
Thanks. Marz
Anyway, I am working on a new project. The basic idea is to use a touch pad to set off a beeper when touched. That part is working. the part I need help with is I want to run a program in parallel that if the touchpad isn`t touched within 5 minutes that the beeper is set off to remind you that the unit is still switched on. Also can the time be reset to zero if the pad is touched?
I was thinking that the enable time function might be able to be used, with the 2 programs running in parallel. Is that the right way to head, or is there a better way?
Here is the code that runs the touchplate, I am using an 08M2:
Code:
setfreq m32
symbol buzzer = c.4
symbol touchplate = c.1
symbol adjustpot = c.2
symbol touchval = w0
symbol adjval = w1
Main:
do
touch16 touchplate , touchval
readADC10 adjustpot,adjval
;debug
if touchval < adjval then
high buzzer
pause 800
low buzzer
pause 800
high buzzer
pause 800
low buzzer
wait 12
else goto main
endif
loop