6.4.3 The Main Task

The tsk_main() task receives what is put on the key_queue by the keyboard task. Based on the received info it creates a string that reflects the last button event. The string is then written to the OLED. Examples of such strings are “Button 2 Released” and “Button 1 Pushed”.

The main task also sends the info about the pushed buttons to the led_queue such that the corresponding LED will be lit. See the figure below for the UML diagram of the main task.

Figure 6-6. Main Task