Answer the question
In order to leave comments, you need to log in
How is the button press time checked?
The essence of the question, when you press the button for 3s, the mode changes in the operation of the MK, so what is the algorithm for checking pressing for 3s?
Answer the question
In order to leave comments, you need to log in
I would interrupt on such a button, which counted seconds and, when released, checked their number.
Every n milliseconds, the status of the button is polled, as a result, there is an array of states. A button is considered pressed during this time if all counts show that it was pressed. For example so.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question