This commit is contained in:
2026-02-06 15:08:06 +01:00
commit 9b2f64b766
6 changed files with 58 additions and 0 deletions

34
main/hello_world_main.c Normal file
View File

@@ -0,0 +1,34 @@
#include <stdio.h>
#include <inttypes.h>
#include "sdkconfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_chip_info.h"
#include "esp_flash.h"
#include "esp_system.h"
#include "driver/gpio.h"
#define LED_GPIO 15
void app_main(void)
{
gpio_config_t io_conf = {
.pin_bit_mask = LED_GPIO,
.mode = GPIO_MODE_OUTPUT,
.pull_up_en = GPIO_PULLUP_DISABLE,
.pull_down_en = GPIO_PULLDOWN_DISABLE,
.intr_type = GPIO_INTR_DISABLE, // No interrupt for now
};
esp_err_t ret = gpio_config(&io_conf);
while(1) {
printf("hello");
vTaskDelay(1000 / portTICK_PERIOD_MS);
gpio_set_level(LED_GPIO, 1);
vTaskDelay(1000 / portTICK_PERIOD_MS);
gpio_set_level(LED_GPIO, 0);
}
}