void task1(void *task1){
pinMode(4, OUTPUT);
while(1){
  digitalWrite(4,!digitalRead(4));
  vTaskDelay(1000);
 }
}

void task2(void *task2){
pinMode(5, OUTPUT);
while(1){
  digitalWrite(5,!digitalRead(5));
  vTaskDelay(2000);
  }
 }


void task3(void *task3){
pinMode(6, OUTPUT);
while(1){
  digitalWrite(6,!digitalRead(6));
  vTaskDelay(3000);
 }
}

void setup() {
 Serial.begin(115200);
 xTaskCreate(task1,"Blink LED1",1024,NULL,1,NULL);
Serial.println("LED1");
 xTaskCreate(task2,"Blink LED2",1024,NULL,1,NULL);
Serial.println("LED2");
 xTaskCreate(task3,"Blink LED3",1024,NULL,1,NULL);
Serial.println("LED3");
}

void loop() {

 delay(1000);

}