Multiple tasks running concurrently
📖 Scenario: You are working on a small embedded system that needs to perform two tasks at the same time: blinking an LED and sending a message over a serial port. To do this, you will create two FreeRTOS tasks that run concurrently.
🎯 Goal: Create two FreeRTOS tasks: one that blinks an LED every 500 milliseconds and another that sends a message "Hello from Task 2" every 1000 milliseconds. Both tasks should run concurrently.
📋 What You'll Learn
Create a task called
Task1 that toggles an LED every 500 msCreate a task called
Task2 that sends the message "Hello from Task 2" every 1000 msUse FreeRTOS API functions to create and start the tasks
Use
vTaskDelay for timing delaysStart the FreeRTOS scheduler to run the tasks concurrently
💡 Why This Matters
🌍 Real World
Embedded systems often need to perform multiple operations at the same time, like blinking LEDs, reading sensors, and communicating. FreeRTOS tasks let you do this easily.
💼 Career
Understanding how to create and manage concurrent tasks is essential for embedded software developers working with real-time operating systems.
Progress0 / 4 steps