Added Basic Melody-Handling Task and temp-task for testing

This commit is contained in:
2025-01-12 19:54:19 +02:00
parent 540d8a14fe
commit 2cbbc8d591
2 changed files with 112 additions and 1 deletions

View File

@@ -28,6 +28,10 @@ volatile bool playing = false;
#include "melody_handling.hpp"
TaskHandle_t myTaskHandle = NULL;
void setup()
{
// Initialize Serial Communication (for debuggin)
@@ -48,6 +52,28 @@ void setup()
ConnectWiFi_STA();
delay(1000);
xTaskCreatePinnedToCore(
bellEngine, // Task function
"bellEngine", // Task name
8192, // Stack size
NULL, // Task input parameters
1, // Task priority, be carefull when changing this
&myTaskHandle, // Task handle, add one if you want control over the task (resume or suspend the task)
1 // Core to run the task on
);
vTaskSuspend(myTaskHandle);
xTaskCreatePinnedToCore(
tempEngine, // Task function
"tempEngine", // Task name
8192, // Stack size
NULL, // Task input parameters
1, // Task priority, be carefull when changing this
NULL, // Task handle, add one if you want control over the task (resume or suspend the task)
1 // Core to run the task on
);
}
void loop()