//Created by Barbu Vulc!
//Running FreeRTOS on an ESP32 board!
#include <stdio.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <driver/gpio.h>

void setup() {
  //Initialize serial communication & FreeRTOS task:
  Serial.begin(9600);
  xTaskCreate(Task, "task", 1024, NULL, 0, NULL);
}

//Task's creation:
void Task(void *pvParameters){
  //(void) pvParameters;
  for(;;){
    Serial.println("Hello Task!");
    vTaskDelay(1000 / portTICK_PERIOD_MS);
  }
}

//We don't need to use loop function here!
void loop() {}