From 2f5808898ffbdc8ae9308abf414b62f157066648 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 23 May 2024 16:35:26 +0300 Subject: (iot/goam) Show ip on display --- Year 3/Internet of things/goam/main/wifi.c | 5 +++++ 1 file changed, 5 insertions(+) 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); } } -- cgit v1.3.1-26-gb76a