27 lines
425 B
C
27 lines
425 B
C
|
|
#include "esp_log.h"
|
||
|
|
#include "freertos/FreeRTOS.h"
|
||
|
|
#include "freertos/event_groups.h"
|
||
|
|
#include "freertos/task.h"
|
||
|
|
#include "nvs_flash.h"
|
||
|
|
|
||
|
|
#include "wifi.h"
|
||
|
|
|
||
|
|
static const char *TAG = "main";
|
||
|
|
void setup(void) {
|
||
|
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||
|
|
wifi_connect();
|
||
|
|
}
|
||
|
|
|
||
|
|
void loop(void) {
|
||
|
|
ESP_LOGI(TAG, "Loop running...");
|
||
|
|
vTaskDelay(pdMS_TO_TICKS(1000));
|
||
|
|
}
|
||
|
|
|
||
|
|
void app_main(void) {
|
||
|
|
setup();
|
||
|
|
|
||
|
|
while (1) {
|
||
|
|
loop();
|
||
|
|
}
|
||
|
|
}
|