Figure 4:
The microcontroller software flowchart.