diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2022-12-01 21:29:34 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2022-12-01 21:29:34 -0700 |
commit | 05e3f6bb7293c771629c7b3599392c8f335e7dd8 (patch) | |
tree | c2a5cd4d27d7673b3a58071c0656f87c92ee9ff3 /main/main.c | |
parent | 8d379bf60e50960f6c855cd6b9c83956a082f73d (diff) | |
download | esp32-ws2812b-05e3f6bb7293c771629c7b3599392c8f335e7dd8.tar.gz esp32-ws2812b-05e3f6bb7293c771629c7b3599392c8f335e7dd8.tar.bz2 esp32-ws2812b-05e3f6bb7293c771629c7b3599392c8f335e7dd8.zip |
Add an HTTP Server.
This server allows the user to control the parameters of the state for
displaying the lights.
Diffstat (limited to 'main/main.c')
-rw-r--r-- | main/main.c | 10 |
1 files changed, 9 insertions, 1 deletions
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); } |