Files
esp32/blink/main/main.c
2025-11-16 19:18:46 -08:00

20 lines
372 B
C

#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
#define LED_PIN 2
void app_main(void)
{
gpio_reset_pin(LED_PIN);
gpio_set_direction(LED_PIN, GPIO_MODE_OUTPUT);
while(1) {
gpio_set_level(LED_PIN, 1);
vTaskDelay(500 / portTICK_PERIOD_MS);
gpio_set_level(LED_PIN, 0);
vTaskDelay(500 / portTICK_PERIOD_MS);
}
}