#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include <driver/gpio.h>
#define LED 4
void app_main() {
printf("Hello, Wokwi!\n");
// Set the direction or mode of the GPIO
gpio_set_direction(LED, GPIO_MODE_INPUT); // Set it as input
while (true) {
if(gpio_get_level(LED)==1)
{
printf("OFF \n"); // Print OFF if the LED is OFF
}
else
{
printf("ON \n"); // Print ON when the LED is ON
}
// vTaskDelay(1000 / portTICK_PERIOD_MS);
}
}