Hello, welcome back.
And this lesson, we go in to see how to create tasks from another task and this very first lesson of
task creation, we created all of our tasks in the main function.
This time, we going to create just a single task in the main function and create the other tasks from
that task.
So what I'm going to do is I'm going to make a copy of this current project.
I'll say copy and then I'll paste over here.
According to.
Creating tasks
from other tasks.
OK, that's a mouthful.
OK.
So I'm going to close this and I'm going to open this new one.
So call source may not see that's where we find our main.
OK, so this is the project.
So what I'm going to do is over here, this is our main function.
We created blue led task.
So I'm going to cut this bit here, this bit that created red and green.
I'm going to cut.
From here.
And then I'm going to bring this into blue.
So this the task function for blue lady controller, I'm going to put it in here such that when Blue
led control, our task is called for the first time, it goes ahead to create these other two tasks
before implementing or increment in its profile a variable here.
OK, let's see how that would work.
Or click here to build.
It's appealed successfully or downloaded onto the board.
I'll switch over here.
Click here to run.
You can see it's running the same way, so this is a very short lesson.
We have a number of short lessons that just give us quick ways of doing various things.
And every now and then, we'll pull all together into a finalized project.
So just bear with a process.
Yeah.
So this was the risk for this lesson, and I'll see you in the next lesson.
Have a nice day.