#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
#include "esp_log.h"
#include "sdkconfig.h"
// Define the GPIO pin number for the LED.
// GPIO 2 is commonly used for the on-board LED on many boards.
#define BLINK_GPIO GPIO_NUM_2
void app_main(void)
{
// Reset the GPIO pin configuration and set it as an output pin
gpio_reset_pin(BLINK_GPIO);
gpio_set_direction(BLINK_GPIO, GPIO_MODE_OUTPUT);
while (1) {
// Turn the LED on (set logic high)
printf("LED ON\n");
gpio_set_level(BLINK_GPIO, 1);
// Delay for 1 second (1000 milliseconds)
vTaskDelay(1000 / portTICK_PERIOD_MS);
// Turn the LED off (set logic low)
printf("LED OFF\n");
gpio_set_level(BLINK_GPIO, 0);
// Delay for another second
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
}