/*|------------------------------------------------------------------------|*/
/*|WiFi connection in STA mode for ESP32 under ESP-IDF - Wokwi simulator   |*/
/*|WiFi info is directly in define macros, no Kconfig / menu configuration |*/
/*|Edited by: martinius96                                                  |*/
/*|Buy me a coffee at: paypal.me/chlebovec for more examples               |*/
/*|Tested under ESP-IDF v4.4.1                                             |*/
/*|------------------------------------------------------------------------|*/

#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/event_groups.h"
#include "esp_system.h"
#include "esp_wifi.h"
#include "esp_event.h"
#include "esp_log.h"
#include "nvs_flash.h"

#include "lwip/err.h"
#include "lwip/sys.h"
#include "driver/gpio.h"

#define led 15
// Wifi event handler


// Main task
void main_task(void *pvParameter)
{
  
}


// Main application
void app_main(void)
{
  gpio_pad_select_gpio(led);
  gpio_set_direction(led,GPIO_MODE_OUTPUT);


  printf("ESP-IDF version used: ");
  printf(IDF_VER"\n");
  int level =500 ;//true;

  while (true){
    gpio_set_level(led,level);
    //level=!level;
    vTaskDelay(1000/portTICK_PERIOD_MS);

  }
  
}