# Arduino GIGA display shield - Spinbox value in arduino

**URL:** <http://forum.squareline.io/t/arduino-giga-display-shield-spinbox-value-in-arduino/2772>\
**Category:** How to\
**Tags:** lvgl\
**Created:** [April 3, 2024, 3:51pm UTC](http://forum.squareline.io/t/arduino-giga-display-shield-spinbox-value-in-arduino/2772 "2024-04-03T15:51:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xs4run4sx](http://forum.squareline.io/letter_avatar_proxy/v4/letter/x/bc79bd/32.png) [@xs4run4sx](http://forum.squareline.io/u/xs4run4sx)\
**Post date:** [April 3, 2024, 3:51pm UTC](http://forum.squareline.io/t/arduino-giga-display-shield-spinbox-value-in-arduino/2772/1 "2024-04-03T15:51:50Z")

</div>

### 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

 ![Screenshot 2024-04-03 184910](http://forum.squareline.io/uploads/default/original/2X/a/a1fc1d9b7fe244239635c34992cbcd0d099aba2f.png)

### Others

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

---

<div class="post-metadata">

**Author:** ![xs4run4sx](http://forum.squareline.io/letter_avatar_proxy/v4/letter/x/bc79bd/32.png) [@xs4run4sx](http://forum.squareline.io/u/xs4run4sx)\
**Post date:** [April 3, 2024, 3:53pm UTC](http://forum.squareline.io/t/arduino-giga-display-shield-spinbox-value-in-arduino/2772/2 "2024-04-03T15:53:44Z")

</div>

![image](http://forum.squareline.io/uploads/default/original/2X/e/e79fb03661eed4661f0ff072fc4a891385225bab.png)

---

<div class="post-metadata">

**Author:** ![Hermit](http://forum.squareline.io/user_avatar/forum.squareline.io/hermit/32/971_2.png) [@Hermit](http://forum.squareline.io/u/Hermit)\
**Post date:** [April 4, 2024, 8:22am UTC](http://forum.squareline.io/t/arduino-giga-display-shield-spinbox-value-in-arduino/2772/3 "2024-04-04T08:22:10Z")

</div>

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.
