Key sequencing logic

The following flowchart illustrates how to detect the correct key sequencing before disarming the alarm. This is one of the question in programming using flowcode. Pay attention to the breaking down of problem in programming.

Disarming the system with key sequence flowchart
Disarming the system with key sequence flowchart

There is still one problem when the program is run: the timing for scanning the key status. If the delay is set too high, the response is very poor or slow. If the delay is set too small, the key sequence detection will not get the proper sequence. That is, before the key is released or completed, the scanning of key is re-done and treat the same key as the second key input and will make a wrong decision. A proper delay or waiting for the key to finish routine is necessary to add to the program.

The final version can be view here.

廣告