time-out code for waitpeq
mikea
Posts: 283
in Propeller 1
Is there a way to time out and restart some code from the beginning after a certain period of time, like 15 seconds if a waitpeq is not is not progressed past?
repeat if INA[7]==1 lcd.str(string(12)) waitcnt(clkfreq/100+cnt) lcd.str(string("deposit 2",17,13)) waitcnt(clkfreq/100+cnt) lcd.str(string("quarters.")) waitcnt(clkfreq/100+cnt) 'initial call for audio triggered by pir, ina[7] dac.playWAVFile(string("whistle.wav")) waitpeq(%100000000000000000000, |< 20, 0) 'Wait for Pin 20 to go high waitpeq(%000000000000000000000, |< 20, 0) 'Then wait for Pin 20 to go low
Comments