From 4c52bff3e73bfb687b3197c619b576512870a030 Mon Sep 17 00:00:00 2001 From: Mitchell M Date: Sat, 4 Apr 2026 11:38:23 -0500 Subject: [PATCH] char lcd --- components/blk_box_lib | 2 +- main/main.cpp | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/components/blk_box_lib b/components/blk_box_lib index 0b79eb8..b3bcb41 160000 --- a/components/blk_box_lib +++ b/components/blk_box_lib @@ -1 +1 @@ -Subproject commit 0b79eb839961095ddf2b1a1a07479a791871acc6 +Subproject commit b3bcb4108da4d9f745405ec6bb08d94545eeca30 diff --git a/main/main.cpp b/main/main.cpp index 1c0596e..ab12234 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -10,12 +10,19 @@ #include "blk_box_drivers/i2c.h" #include "blk_box_drivers/inputs.hpp" #include "blk_box_drivers/leds.hpp" +#include "blk_box_drivers/char_lcd.hpp" +#include "blk_box_drivers/helpers.hpp" extern "C" void app_main(void) { BlkBoxInitConfig blk_box_cfg = {}; init_blk_box(blk_box_cfg); - printf("Hello, Blk Box!\n"); + LCDController::set_backlight(true); + + lcd_do_splash(); + + LCDController::set_resting_cursor_mode(CursorMode::Show); + LCDController::set_resting_cursor_pos(0, 0); uint32_t i = 0; @@ -31,8 +38,10 @@ extern "C" void app_main(void) { LEDController::flush(); } else if (b == Button::RED) { i = (i + 1) % LED_INDICATOR_COUNT; + LCDController::set_resting_cursor_pos(0, i % 20); } else if (b == Button::BLUE) { i = (i + LED_INDICATOR_COUNT - 1) % LED_INDICATOR_COUNT; + LCDController::set_resting_cursor_pos(0, i % 20); } }