Im getting this error
error: 'ui' was not declared in this scope lv_label_set_text(ui.BGPOS, labelValue);
What MCU/Processor/Board and compiler are you using?
What LVGL version are you using?
What do you want to achieve?
pass a value from the encoder to the label BGPOS
What have you tried so far?
IVe entered the following code to pass the value to the BGPOS label to display, this is in ui.h
Code to reproduce
// Read the encoder position
int encoderPos = encoder.read() / 4; // Adjust for ppi (256) of the encoder
// Convert the encoder position to millimeters
float pitch = 100.0; // Pitch in millimeters per pulse
float encoderPos_mm = encoderPos * pitch;
// Update the label with the new position
sprintf(labelValue, “BGPOS: %.1f mm”, encoderPos_mm);
I get `i\ui.ino:143:21: error: ‘ui’ was not declared in this scope
exit status 1
Compilation error: ‘ui’ was not declared in this scope`