Open yonghuming opened 6 years ago
The solution is to not use sleep (or use only very short sleeps), but instead completely change the organization of your code to keep track of the current state and the time left to do the next action.
have you tried using button_a.get_presses()
this returns the number of times a button has been pressed since last called. if 0 is returned the button has not been pressed.
hi, i want to change mode when press buttons, but the sleep prevent detect press event, i want to change mode when press button