Arduino GIGA display shield - Spinbox value in arduino

What do you want to achieve?

Hello! I have just started my project using Arduino GIGA and Arduino GIGA display shield. I have successfully created and exported button states to my arduino. Next step which I want to do is to enter value on my display using spinbox and to use that value in my arduino code. For example: I want to be able to add value from 0 to 100 on my HMI using spinbox and I want to use that value in my code. Could you please suggest me a way how to do that?

What have you tried so far?

I have tried int32_t lv_spinbox_get_value([lv_obj_t] function, but since I’m pretty new in programming, I can not make it work.

Screenshot or video

Others

  • SquareLine Studio version: 1.4.0
  • Operating system: Windows 11
  • Target hardware: Arduino GIGA

Now you have the event trigger set to RELEASED, but the usual way is to use VALUE_CHANGED instead. The actual action, the callback function ‘lvestiLaiduKieki’ for the value-change will be created in ui_events.c (if ‘Don’t export function’ is not checked’) where you can edit its body afterwards. You can use the ‘lv_spinbox_get_value’ call inside that function by directly giving the spinbox widget’s handle, but you can also get it from the passed event struct if you prefer not using global variable inside the callback function.