2023-09-18 20:41:46 +00:00
|
|
|
#include "leds.h"
|
2023-09-15 06:21:00 +00:00
|
|
|
#include "shared.h"
|
|
|
|
#include "network.h"
|
2023-09-18 20:41:46 +00:00
|
|
|
#include "server.h"
|
2023-09-15 06:21:00 +00:00
|
|
|
#include "rom/ets_sys.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2023-09-18 20:41:46 +00:00
|
|
|
static
|
|
|
|
void init_esp(void) {
|
|
|
|
ESP_ERROR_CHECK(esp_netif_init());
|
|
|
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
|
|
|
}
|
|
|
|
|
|
|
|
void app_main(void) {
|
|
|
|
LOGLN("---- starting");
|
2023-09-15 06:21:00 +00:00
|
|
|
|
2023-09-18 20:41:46 +00:00
|
|
|
init_esp();
|
|
|
|
leds_init();
|
|
|
|
send_leds();
|
2023-09-15 06:21:00 +00:00
|
|
|
wifi_init();
|
|
|
|
softap_init();
|
2023-09-18 20:41:46 +00:00
|
|
|
server_init();
|
|
|
|
|
|
|
|
os_delay_us(10000);
|
|
|
|
send_leds();
|
2023-09-15 06:21:00 +00:00
|
|
|
|
2023-09-18 20:41:46 +00:00
|
|
|
LOGLN("---- finished setting up");
|
2023-09-15 06:21:00 +00:00
|
|
|
}
|
|
|
|
|