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(lcd-16x2)
+2
View File
@@ -0,0 +1,2 @@
idf_component_register(SRCS "lcd-16x2.c"
INCLUDE_DIRS ".")
+17
View File
@@ -0,0 +1,17 @@
## IDF Component Manager Manifest File
dependencies:
## Required IDF version
idf:
version: '>=4.1.0'
# # Put list of dependencies here
# # For components maintained by Espressif:
# component: "~1.0.0"
# # For 3rd party components:
# username/component: ">=1.0.0,<2.0.0"
# username2/component2:
# version: "~1.0.0"
# # For transient dependencies `public` flag can be set.
# # `public` flag doesn't have an effect dependencies of the `main` component.
# # All dependencies of `main` are public by default.
# public: true
panigrah/esp32-idf-hd44780: ^0.0.3
+44
View File
@@ -0,0 +1,44 @@
#include "HD44780.h"
#include <driver/i2c.h>
#include <esp_log.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <stdio.h>
#define LCD_ADDR 0x27
#define SDA_PIN 21
#define SCL_PIN 22
#define LCD_COLS 16
#define LCD_ROWS 2
void app_main(void) {
char *tag = "LCD_16x2";
ESP_LOGI(tag, "starting app_main");
LCD_init(LCD_ADDR, SDA_PIN, SCL_PIN, LCD_COLS, LCD_ROWS);
// LCD_clearScreen();
// LCD_writeStr("Hello There");
// LCD_setCursor(0, 1);
// LCD_writeStr(" Second Row! ");
char num[8];
while (true) {
LCD_clearScreen();
LCD_writeStr("Counting Down");
for (int i = 10; i >= 0; i--) {
LCD_setCursor(8, 1);
sprintf(num, "%d", i);
LCD_writeStr(num);
vTaskDelay(1000 / portTICK_PERIOD_MS);
LCD_setCursor(0, 1);
LCD_writeStr(" ");
}
LCD_clearScreen();
LCD_writeStr("Liftoff!");
vTaskDelay(2000 / portTICK_PERIOD_MS);
}
}