#include <Arduino.h>
// put function declarations here:
int myFunction(int, int);
void task1(void *ptr)
{
String task1_str= *(String*)ptr;
for (;;)
{
Serial.println(task1_str);
vTaskDelay(1000);
}
}
void setup()
{
Serial.begin(9600);
String str="hello";
xTaskCreate(task1, "SerialPrint", 1024, (void*)&str, 1, NULL);
}
void loop()
{
// put your main code here, to run repeatedly:
}