S
S
Slavka2015-08-02 17:06:48
Microcontrollers
Slavka, 2015-08-02 17:06:48

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

3 answer(s)
A
Alexander Shpak, 2015-08-02
@shpaker

I would interrupt on such a button, which counted seconds and, when released, checked their number.

V
Vladimir Martyanov, 2015-08-02
@vilgeforce

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 question

Ask a Question

731 491 924 answers to any question