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
+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);
}
}