uEZ GUI Start Here Guide
UEZGUI-1788-43WQR
Rev. 1.11 Aug 31, 2016
Page 22
G.
Creating a Task
The next set of steps will describe the process for setting up a new task to monitor the
data provided by the onboard I
2
C digital temperature sensor. Creating new tasks allows
multiple continuous processes to operate “simultaneously” by taking advantage of
FreeRTOS’ ability to simulate threading without the need for complex hardware. In
effect, tasks are equivalent to threads. It is important that a small delay is introduced
into the task’s loop to avoid bogging down the processor. Doing this allows the other
tasks to take priority during the delayed time and doesn’t use unnecessary processing.
The following flow diagram describes the task as it will be designed.
To save time, the thread files MyTask.c and MyTask.h are included with the Start Here
\Source\App\ directory. In the next steps we will add them into the App directory of the
project as done before with the SecondScreen.c. Shown below is an excerpt of the
temperature loop task code from MyTask.c
Figure 17:
Temp Loop
Task Flow