 
   /* start time dependent tasks */
 
-  xTaskCreatePinnedToCore(
+  BaseType_t xReturned;
+
+  xReturned = xTaskCreatePinnedToCore(
     dimmerTask,                     /* Function to implement the task */
     "dimmerTask",                   /* Name of the task */
     2500,                           /* Stack size in words */

    &xDimmerTaskHandle,             /* Task handle. */
    1);                             /* Core where the task should run */

  xTaskCreatePinnedToCore(
    loggerTask,                     /* Function to implement the task */
    "loggerTask",                   /* Name of the task */
    3000,                           /* Stack size in words */

    loggerTaskPriority,             /* Priority of the task */
    &xLoggerTaskHandle,             /* Task handle. */
    1);                             /* Core where the task should run */

  ESP_LOGI( TAG, "LoggerTask %s.", ( xReturned == pdPASS ) ? "started" : "failed" );

  vTaskDelete( NULL );

