filmov
tv
FreeRTOS With Arduino Tutorials 2 - How to Handle Tasks with FreeRTOS on Arduino.

Показать описание
In this video, we will know how to handle Tasks with FreeRTOS on Arduino.
FreeRTOS: Free Real Time Operating System
Create task function:
void TaskBlink( void *pvParameters )
Create Handle task:
TaskHandle_t TaskHandle_1
Create task:
xTaskCreate(TaskBlink, "Task1", 100, NULL, 2, &TaskHandle_1);
// First param : Function you want to create
// Second param : Name of task
// Third param : Stack memory size
// Fourth param : Param (we don't transfer param so we put it NULL)
// Fifth param : Priority (The highest priority will run first - adding tasks until you run out of RAM)
// Last param : Reference(&) Handletask
Create delay (less accuracy):
vTaskDelay( 1000 / portTICK_PERIOD_MS ); // run per second
Background:
- We don't need to put source code in side void loop() function
- Inside task function, we need to put INFINITE loop:
- while(1) or for(;;)
#ProgrammingKnowledge #Arduino #FreeRTOS #ArduinoTutorial
★★★Top Online Courses From ProgrammingKnowledge ★★★
★★★ Online Courses to learn ★★★
★★★ Follow ★★★
DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
FreeRTOS: Free Real Time Operating System
Create task function:
void TaskBlink( void *pvParameters )
Create Handle task:
TaskHandle_t TaskHandle_1
Create task:
xTaskCreate(TaskBlink, "Task1", 100, NULL, 2, &TaskHandle_1);
// First param : Function you want to create
// Second param : Name of task
// Third param : Stack memory size
// Fourth param : Param (we don't transfer param so we put it NULL)
// Fifth param : Priority (The highest priority will run first - adding tasks until you run out of RAM)
// Last param : Reference(&) Handletask
Create delay (less accuracy):
vTaskDelay( 1000 / portTICK_PERIOD_MS ); // run per second
Background:
- We don't need to put source code in side void loop() function
- Inside task function, we need to put INFINITE loop:
- while(1) or for(;;)
#ProgrammingKnowledge #Arduino #FreeRTOS #ArduinoTutorial
★★★Top Online Courses From ProgrammingKnowledge ★★★
★★★ Online Courses to learn ★★★
★★★ Follow ★★★
DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
Комментарии