From 6535ed6804c2aea49cd2f967c9c0f6ecc3830c6d Mon Sep 17 00:00:00 2001 From: Elias Ahokas Date: Wed, 15 Oct 2025 21:52:37 +0300 Subject: [PATCH] change font and change i2c pins --- main/CMakeLists.txt | 2 +- main/main.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 99dc6df..4953f1c 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -1,3 +1,3 @@ idf_component_register(SRCS "main.c" INCLUDE_DIRS "." - REQUIRES lvgl) \ No newline at end of file + REQUIRES lvgl driver freertos) \ No newline at end of file diff --git a/main/main.c b/main/main.c index 323b299..be4cacf 100644 --- a/main/main.c +++ b/main/main.c @@ -8,8 +8,8 @@ #include "lvgl.h" -#define I2C_SCL 1 /*FIXME*/ -#define I2C_SDA 2 +#define I2C_SCL 19 +#define I2C_SDA 21 /* Docs: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf */ #define DISP_ADDRESS 0X3c @@ -157,6 +157,7 @@ void counter_task(void *arg){ void create_counter(void){ counter_label = lv_label_create(lv_scr_act()); + lv_obj_set_style_text_font(counter_label, &lv_font_montserrat_16, 0); lv_label_set_text(counter_label, "00"); lv_obj_align(counter_label, LV_ALIGN_CENTER, 0, 0);