This commit is contained in:
Mitchell Marino 2026-04-04 11:38:23 -05:00
parent 5ea3df10a4
commit 4c52bff3e7
2 changed files with 11 additions and 2 deletions

@ -1 +1 @@
Subproject commit 0b79eb839961095ddf2b1a1a07479a791871acc6
Subproject commit b3bcb4108da4d9f745405ec6bb08d94545eeca30

View File

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