diff --git a/main/Kconfig.projbuild b/main/Kconfig.projbuild new file mode 100644 index 0000000..7e23439 --- /dev/null +++ b/main/Kconfig.projbuild @@ -0,0 +1,14 @@ +# put here your custom config value +menu "Example Configuration" +config ESP_WIFI_SSID + string "WiFi SSID" + default "myssid" + help + SSID (network name) for the example to connect to. + +config ESP_WIFI_PASSWORD + string "WiFi Password" + default "mypassword" + help + WiFi password (WPA or WPA2) for the example to use. +endmenu diff --git a/main/main.c b/main/main.c index 6425a90..24bafb4 100644 --- a/main/main.c +++ b/main/main.c @@ -22,8 +22,8 @@ void app_main(void) ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) ); wifi_config_t sta_config = { .sta = { - .ssid = "access_point_name", - .password = "password", + .ssid = CONFIG_ESP_WIFI_SSID, + .password = CONFIG_ESP_WIFI_PASSWORD, .bssid_set = false } };