From 05e3f6bb7293c771629c7b3599392c8f335e7dd8 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Thu, 1 Dec 2022 21:29:34 -0700 Subject: Add an HTTP Server. This server allows the user to control the parameters of the state for displaying the lights. --- main/main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'main/main.c') diff --git a/main/main.c b/main/main.c index 9cd4f0f..82fff1e 100644 --- a/main/main.c +++ b/main/main.c @@ -6,6 +6,8 @@ #include "freertos/task.h" #include "sdkconfig.h" +#include "station.h" +#include "http_server.h" #include "ws2812b_writer.h" #include "tcp_server.h" @@ -91,7 +93,7 @@ void app_main(void) printf("miso: %d\n", PIN_NUM_MISO); printf("mosi: %d\n", PIN_NUM_MOSI); printf("sclk: %d\n", PIN_NUM_CLK); - printf("Tick period ms: %d\n", portTICK_PERIOD_MS); + printf("Tick period ms: %d\n", (int) portTICK_PERIOD_MS); error = spi_bus_initialize(HSPI_HOST, &cfg, SPI_DMA_CH_AUTO); printf("Bus Init\n"); @@ -105,7 +107,13 @@ void app_main(void) printf("Configuration complete!!\n"); + ESP_LOGI("main", "Connection to AP"); + wifi_init_station("Wort", "JoshIsBau5"); + ESP_LOGI("main", "Complete!"); + xTaskCreate(time_keeper, "time_keeper", 1024, &ws_params, 1, NULL); xTaskCreate(ws2812b_write_task, "ws2812b_writer", 4096, &ws_params, 1, NULL); xTaskCreate(tcp_server, "tcp_server", 4096, &ws_params, 2, NULL); + + start_webserver(&ws_params); } -- cgit