add delay

This commit is contained in:
Laila van Reenen 2024-06-18 21:16:50 +02:00
parent 60a5dd7415
commit 3240f2311f
Signed by: LailaTheElf
GPG Key ID: 1F4E6EE3E6DDF769

View File

@ -5,6 +5,7 @@
#include "esp_log.h"
#include "esp_wifi.h"
#include "esp_event.h"
#include "esp_task_wdt.h"
#include "../lib/cli/CLI/CLI.h"
#include "../lib/cli/CMDList/CMDList.h"
@ -127,6 +128,14 @@ void wifiInit()
}
void app_main() {
// disable watchdog
ESP_ERROR_CHECK(esp_task_wdt_deinit());
// wait so I have time to open the serial monitor
for (unsigned long i=0; i < 100000; i++){
printf(".");
}
/* Initialize NVS — it is used to store PHY calibration data */
esp_err_t ret = nvs_flash_init();
if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
@ -137,6 +146,8 @@ void app_main() {
printChipInfo();
wifiInit();
/* Waiting until either the connection is established (WIFI_CONNECTED_BIT) or connection failed for the maximum
* number of re-tries (WIFI_FAIL_BIT). The bits are set by event_handler() (see above) */
EventBits_t bits = xEventGroupWaitBits(s_wifi_event_group,
@ -155,10 +166,9 @@ void app_main() {
ESP_LOGE(TAG, "UNEXPECTED EVENT");
}
while(true)
// while(true)
{
ESP_LOGI(TAG, ":3");
}
// running = true;