#include <Arduino_FreeRTOS.h>
//Lecture - IDLE TASKS FOR POWER SAVING
//NOTES
//Sleep Wake - up Sources:
//1. Timer
//2. External Interrupts
//3. ADC Conversoin comepletion
//check the FreeRTOS Blink and FreeRTOS Blink Low
void setup() {
Serial.begin(9600);
xTaskCreate(task1, "print task", 128, NULL, 2, NULL );
xTaskCreate(task2, "print task", 128, NULL, 2, NULL );
}
void loop()
{
//Idle happens in loop code
Serial.println("Hello from Idle Task"); //this is in idle task and priority 0 '
}
void task1(void *pvParameters)
{
while(1){
Serial.println("hello from task 1");
vTaskDelay( 1000 / portTICK_PERIOD_MS );
}
}
void task2(void *pvParameters)
{
while(1){
Serial.println("hello from task 2");
vTaskDelay( 1000 / portTICK_PERIOD_MS );
}
}