change font and change i2c pins

This commit is contained in:
Elias Ahokas
2025-10-15 21:52:37 +03:00
parent 1b02b91442
commit 6535ed6804
2 changed files with 4 additions and 3 deletions

View File

@@ -1,3 +1,3 @@
idf_component_register(SRCS "main.c" idf_component_register(SRCS "main.c"
INCLUDE_DIRS "." INCLUDE_DIRS "."
REQUIRES lvgl) REQUIRES lvgl driver freertos)

View File

@@ -8,8 +8,8 @@
#include "lvgl.h" #include "lvgl.h"
#define I2C_SCL 1 /*FIXME*/ #define I2C_SCL 19
#define I2C_SDA 2 #define I2C_SDA 21
/* Docs: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf */ /* Docs: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf */
#define DISP_ADDRESS 0X3c #define DISP_ADDRESS 0X3c
@@ -157,6 +157,7 @@ void counter_task(void *arg){
void create_counter(void){ void create_counter(void){
counter_label = lv_label_create(lv_scr_act()); 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_label_set_text(counter_label, "00");
lv_obj_align(counter_label, LV_ALIGN_CENTER, 0, 0); lv_obj_align(counter_label, LV_ALIGN_CENTER, 0, 0);