I'm pretty new using ESP boards and I have some problems using the esp_wifi library. I will show you how I wrote the code:
- static void Wifi_inicialitzation(void){
- wifi_init_config_t wifiInitConfig = WIFI_INIT_CONFIG_DEFAULT();
- if (esp_wifi_init(wifiInitConfig) != ESP_OK){
- printf("Can't run esp_wifi_init()...\n");
- return;
- else {
- printf("esp_wifi_init() running...\n");
- }
- esp_wifi_set_mode(WIFI_MODE_STA);
- esp_wifi_start();
- esp_wifi_connect();
- }