From 6833b44f50ee596fcc852b2e0ad4ed1559a8e20a Mon Sep 17 00:00:00 2001 From: Joey Castillo Date: Tue, 27 Apr 2021 23:06:48 -0400 Subject: initial work on segment LCD --- Smol Watch Project/My Project/main.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'Smol Watch Project/My Project/main.c') diff --git a/Smol Watch Project/My Project/main.c b/Smol Watch Project/My Project/main.c index 27f77317..ede6d12b 100644 --- a/Smol Watch Project/My Project/main.c +++ b/Smol Watch Project/My Project/main.c @@ -15,13 +15,18 @@ int main(void) date_time.time.sec = 0; watch_init(&watch); - watch_enable_led(); - watch_enable_date_time(); + + watch_enable_led(&watch); + + watch_enable_date_time(&watch); watch_set_date_time(date_time); + watch_enable_digital_output(A0); gpio_set_pin_level(A0, true); - watch_enable_i2c(); - + + watch_enable_display(&watch); +/* + watch_enable_i2c(&watch); uint8_t chipID = 0; uint8_t ChipIdRegister = 0xD0; watch_i2c_send(0x77, &ChipIdRegister, 1); @@ -29,7 +34,7 @@ int main(void) if (chipID == 0x60) { watch_set_led_green(); } - +*/ uint8_t last = date_time.time.sec; while (1) { @@ -37,9 +42,11 @@ int main(void) if (date_time.time.sec != last) { last = date_time.time.sec; if (last % 2 == 0) { - watch_set_led_red(); + watch_set_led_color(50, 0); + watch_display_string(&watch, watch.main_display, " Hello"); } else { - watch_set_led_green(); + watch_set_led_color(0, 50); + watch_display_string(&watch, watch.main_display, " there"); } } } -- cgit v1.2.3