Henrik thanks for that.
I'm trying to use the COUNT command that mackrackit put me onto to jump from one loop to the next after a button is pressed. There are three loops (count up to nine when button pressed once - Jump to second loop and count down from nine if button pressed a second time and to a final third loop, count down from five after button is pressed a third time).
Is this code anywhere near to where I need to be? If I'm close but not quite there please let me carry on thinking. If I'm miles off course then a pointer would be much appreciated.
My code tags are working today, I didn't touch anything.Code:COUNT PIN.n, 10000, VAR B_P_C WORD 'Set GPIO.n as input, define Button Push Count as VAR WORD B_P_C, with a loop count time of 10 secs. Let i = B_P_C IF B_P_C = i GOTO FIRSTLOOP ' Button pressed once IF B_p_c = i+i GOTO SECONDLOOP ' Button pressed twice IF B_P_C = i+i+i Goto THIRDLOOP ' Button pressed a third time
David




Bookmarks