Here is the practical code I'm using, but it sometimes behaves strangely.
Say, button was pressed, action was made once, user still holds button, so no advance in code. But when user releases the button, sometimes it acts as button was pressed once again. Any ideas how to fix it?
Code:MENULOOP: 'MAIN CONFIG SCREEN IF UPBT=0 THEN MENUITEM=MENUITEM+1 IF MENUITEM>4 THEN MENUITEM=1 GOSUB CENTRAL pause 200 'debounce ENDIF WHILE UPBT=0:WEND IF DNBT=0 THEN MENUITEM=MENUITEM-1 IF MENUITEM<1 THEN MENUITEM=4 GOSUB CENTRAL pause 200 'debounce ENDIF WHILE DNBT=0:WEND if menuitem=1 and rbut=0 then pause 5 while rbut=0: wend goto clockconfig endif GOTO MENULOOP




Bookmarks