counter workings

This commit is contained in:
Elias Ahokas
2025-10-17 21:38:35 +03:00
parent b93cf777a5
commit 75ca356f1c
2 changed files with 11 additions and 1481 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -5,11 +5,12 @@
#include "freertos/task.h"
#define LV_CONF_INCLUDE_SIMPLE 1
#include "lv_conf.h"
#include "lv_conf.h"
#include "lvgl.h"
#define I2C_SCL 19
#define I2C_SDA 21
@@ -307,12 +308,17 @@ void create_counter(void){
counter_label = lv_label_create(scr);
printf("Label created");
lv_label_set_text(counter_label, "00");
lv_obj_set_style_text_color(counter_label, lv_color_white(), 0);
lv_obj_set_style_text_font(counter_label, &lv_font_montserrat_24, 0);
lv_obj_set_style_text_align(counter_label, LV_TEXT_ALIGN_CENTER, 0);
lv_obj_set_width(counter_label, LV_HOR_RES);
lv_label_set_text(counter_label, "00");
lv_obj_align(counter_label, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_style_pad_all(counter_label, 0, 0);
lv_obj_set_style_margin_all(counter_label, 0, 0);
lv_obj_set_width(counter_label, LV_SIZE_CONTENT);
lv_obj_set_style_text_align(counter_label, LV_TEXT_ALIGN_LEFT, 0);
lv_obj_align(counter_label, LV_ALIGN_TOP_LEFT, 0, 0);
xTaskCreate(counter_task, "counter_task", 2048, NULL, 5, NULL);
printf("Counter task created");