source code migrating from gitlab

This commit is contained in:
2026-05-15 15:51:41 -04:00
commit 6cf9a21574
28 changed files with 2960 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
# The following five lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(blink)
+12
View File
@@ -0,0 +1,12 @@
# Blink
## The quintessential project
The 'hello world' of embedded projects is to get an LED to blink
## Links for more info:
github for esp-idf: https://docs.espressif.com/projects/esp-idf/en/stable/esp32/index.html
docs: https://docs.espressif.com/
in depth video on esp-idf: https://www.youtube.com/watch?v=J8zc8mMNKtc
+2
View File
@@ -0,0 +1,2 @@
idf_component_register(SRCS "blink.c"
INCLUDE_DIRS ".")
+25
View File
@@ -0,0 +1,25 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_log.h"
#include "driver/gpio.h"
#define LED 2
void app_main(void) {
const char *tag = "blink";
ESP_LOGI(tag, "Starting blink!\n");
const uint32_t hi = 1, lo = 0;
const TickType_t duration = 500 / portTICK_PERIOD_MS;
gpio_reset_pin(LED);
gpio_set_direction(LED, GPIO_MODE_OUTPUT);
while (1) {
gpio_set_level(LED, hi);
vTaskDelay(duration);
gpio_set_level(LED, lo);
vTaskDelay(duration);
}
}