#include #include "sdkconfig.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "esp_system.h" #include "esp_spi_flash.h" #include "freertos/queue.h" #include "esp_attr.h" #include "esp_log.h" #include "config.h" #include "wifi.h" #include "serial.h" #include "displayAndSend.h" #include "pcnt_functions.h" // Chip info: // This is esp32 chip with 2 CPU cores, WiFi/BT/BLE, silicon revision 1, 4MB external flash void app_main(void) { ESP_LOGI("MAIN", "HomeEnergyMeter ESP32"); #ifdef WIFI_ENABLED initWifi(); // Init WIFI #endif #ifdef MQTT_ENABLED mqtt_init(); #endif #ifdef CCFG_PCNT initPCNT(); #endif #ifdef SERIAL_ENABLED initSerial(); #endif initDisplayAndSend(); vTaskDelete(NULL); }