// ESP libraries
#include <nvs_flash.h>
#include <esp_log.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <inttypes.h>
extern "C" void app_main() {
static const char* TAG = "main";
//Initialize NVS
esp_err_t ret = nvs_flash_init();
if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
ESP_ERROR_CHECK(nvs_flash_erase());
ret = nvs_flash_init();
}
ESP_ERROR_CHECK(ret);
ESP_LOGI(TAG, "---------------------");
ESP_LOGI(TAG, "Init");
//ikl_wifi_init();
//ikl_gpio_init();
//ikl_rc522_init();
int press_count = 0;
while (true) {
printf("press_count = %ld\n,", press_count++);
//gpio_switch_led();
vTaskDelay(pdMS_TO_TICKS(5000));
//todo move LED onoff onto separate task
}
}