diff options
| Commit | 2f5808898ffbdc8ae9308abf414b62f157066648 (patch) | |
|---|---|---|
| Author | 2024-05-23 16:35:26 +0300 | |
| Committer | 2024-05-23 16:35:26 +0300 | |
| Files | dfaf3b2bdafeb9f3827009c572dbe59bd70df1c7 | |
| uni-projects-2f5808898ffbdc8ae9308abf414b62f157066648.tar uni-projects-2f5808898ffbdc8ae9308abf414b62f157066648.tar.gz uni-projects-2f5808898ffbdc8ae9308abf414b62f157066648.zip | ||
| Parent | 26d05638f13ab41591a5a82012e895c64a3564ec (diff) | |
(iot/goam) Show ip on display
1 files changed, 5 insertions, 0 deletions
| -rw-r--r-- | Year 3/Internet of things/goam/main/wifi.c | 5 |
diff --git a/Year 3/Internet of things/goam/main/wifi.c b/Year 3/Internet of things/goam/main/wifi.c index ef94490..3b58f82 100644 --- a/Year 3/Internet of things/goam/main/wifi.c +++ b/Year 3/Internet of things/goam/main/wifi.c @@ -7,6 +7,7 @@ #include "esp_log.h" #include "wifi.h" +#include "display.h" #define ESP_WIFI_SCAN_AUTH_MODE_THRESHOLD WIFI_AUTH_WPA2_PSK @@ -56,6 +57,10 @@ static void event_handler(void* arg, esp_event_base_t event_base, int32_t event_ ip_event_got_ip_t* event = (ip_event_got_ip_t*) event_data; ESP_LOGI(TAG, "Connected to SSID:%s password:%s, got ip:" IPSTR, ESP_WIFI_SSID, ESP_WIFI_PASS, IP2STR(&event->ip_info.ip)); + + char ip[16]; + sprintf(ip, IPSTR, IP2STR(&event->ip_info.ip)); + display_printon(ip, 2); } } |
