#include "FreeRTOS.h"
#include "task.h"
// Task function
void simpleTask(void *pvParameters) {
while (1) {
digitalWrite(8, HIGH);
delay(500);
digitalWrite(8, LOW);
delay(500);
}
}
void simpleTask1(void *pvParameters) {
while(1){
digitalWrite(7, HIGH);
delay(1500);
digitalWrite(7, LOW);
delay(1500);
}
}
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, Thankan chettan");
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
// Create a task with a priority of 1
xTaskCreate(simpleTask, "SimpleTask", configMINIMAL_STACK_SIZE, NULL, 2, NULL);
xTaskCreate(simpleTask1, "SimpleTask1", configMINIMAL_STACK_SIZE, NULL, 5, NULL);
// Start the scheduler
vTaskStartScheduler();
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}