1968neil
Senior Member
Hi Folk's,
Is it possible to do the following with an 08M2 ?
Press a button that goes to play a tune (tune command) and if the same button is pressed interrupt that tune and return to the start of the program ?
rough example
Is it possible to do the following with an 08M2 ?
Press a button that goes to play a tune (tune command) and if the same button is pressed interrupt that tune and return to the start of the program ?
rough example
Code:
'PICAXE-08M2
'No Data
Symbol press_Button = PinC.4
Main:
pause 10
if press_Button=1 then PlayTune
pause 10
goto main 'loop back to main
PlayTune:
; interrupt this routine and return to main ?
tune 0, 7, ($40,$48,$43,$4A,$50,$58,$53,$5A,$50)
Goto Main