#include "esp_log.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "light.c" #include "mqtt.c" #include "sdkconfig.h" #include "wifi.c" static const char *TAG = "ScreenBgLight"; void app_main(void) { light_init_strip(); vTaskDelay(pdMS_TO_TICKS(10)); light_play(light_mode_connection_wifi); if (connect_wifi()) { light_play(light_mode_idle); } vTaskDelay(pdMS_TO_TICKS(1000)); mqtt_app_start(); if (waiting_for_mqtt_connected()) { light_play(light_mode_mqtt_connected); } if (waiting_for_desktop_online()) { light_play(light_mode_desktop_online); } while (waiting_and_get_colors()) { light_play_colors(NUMBER_OF_LEDS * 3, mqtt_colors_buffer); } }