#include "freertos/FreeRTOS.h" #include "freertos/task.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. Core:%d",xPortGetCoreID()); #ifdef WIFI_ENABLED initWifi(); // Init WIFI #endif #ifdef MQTT_ENABLED mqtt_init(); #endif #ifdef CCFG_PCNT initPCNT(); #endif #ifdef CCFG_GEN_PULSE ledc_init(); #endif #ifdef SERIAL_ENABLED initSerial(); #endif initDisplayAndSend(); vTaskDelete(NULL); }