#include "freertos/FreeRTOS.h" #include "esp_log.h" #include "nvs_flash.h" #include "lwip/err.h" // #include "wifi_station.h" #include "shake_detect.h" static const char *TAG = "esp32_shock_main"; void app_main(void) { // 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); shake_detect_init(); while (1) { // ESP_LOGI(TAG, "Hello, world!"); vTaskDelay(pdMS_TO_TICKS(1000)); } }