#if CONFIG_FREERTOS_UNICORE
static const BaseType_t app_cpu=0;
#else
static const BaseType_t app_cpu=1;
#endif
void playMusic(void *parameter){
while(1){
Serial.println("audio is playing");
vTaskDelay(0.0001/portTICK_PERIOD_MS);
}
}
void creatingWebServer(void *parameter){
while(1){
// web server code will be goes here
}
}
void setup() {
Serial.begin(115200);
xTaskCreatePinnedToCore(
playMusic,
"play music",
1024,
NULL,
1,
NULL,
app_cpu);
xTaskCreatePinnedToCore(
creatingWebServer,
"webserver created",
1024,
NULL,
1,
NULL,
app_cpu);
}
void loop() {
// put your main code here, to run repeatedly:
}