# Display incremental Slider/Bar during ESP32 Setup

**URL:** <http://forum.squareline.io/t/display-incremental-slider-bar-during-esp32-setup/855>\
**Category:** How to\
**Created:** [February 6, 2023, 7:05pm UTC](http://forum.squareline.io/t/display-incremental-slider-bar-during-esp32-setup/855 "2023-02-06T19:05:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hans](http://forum.squareline.io/letter_avatar_proxy/v4/letter/h/e19b73/32.png) [@hans](http://forum.squareline.io/u/hans)\
**Post date:** [February 6, 2023, 7:05pm UTC](http://forum.squareline.io/t/display-incremental-slider-bar-during-esp32-setup/855/1 "2023-02-06T19:05:05Z")

</div>

### What do you want to achieve?

Show an incremental slider/bar during setup of an ESP32.

### What have you tried so far?

```auto
void setup()
{
  lv_init();
  tft.begin(); /* TFT init */
  tft.setRotation( 0 ); /* Landscape orientation, flipped */

  //... snip ...

  ui_init();
  for (int i=0; i < 100; i++) {
    lv_slider_set_value(ui_BootSlider, i, LV_ANIM_OFF);
    lv_event_send(ui_BootSlider, LV_EVENT_VALUE_CHANGED, NULL);
    delay(100);
  }
}

```

Afer about 10 seconds the slider is shown 100% without showing any values in between.

### Others

- **SquareLine Studio version:**  
SquareLine\_Studio\_Linux\_v1\_2\_0
- **Operating system:**  
Ubuntu 20.04.5 LTS
- **Target hardware:**  
ESP32-Wroom-32

---

<div class="post-metadata">

**Author:** ![kisvegabor](http://forum.squareline.io/user_avatar/forum.squareline.io/kisvegabor/32/537_2.png) [@kisvegabor](http://forum.squareline.io/u/kisvegabor)\
**Post date:** [February 7, 2023, 6:54pm UTC](http://forum.squareline.io/t/display-incremental-slider-bar-during-esp32-setup/855/2 "2023-02-07T18:54:38Z")

</div>

Hi,

LVGL refreshes the screen in `lv_timer_handler`. In your cycle `lv_timer_handler` is not called, so LVGL can’t refresh the screen.

To solve this you can call `lv_refr_now(NULL)` before the `delay()`.

---

<div class="post-metadata">

**Author:** ![hans](http://forum.squareline.io/letter_avatar_proxy/v4/letter/h/e19b73/32.png) [@hans](http://forum.squareline.io/u/hans)\
**Post date:** [February 7, 2023, 10:20pm UTC](http://forum.squareline.io/t/display-incremental-slider-bar-during-esp32-setup/855/3 "2023-02-07T22:20:12Z")

</div>

Thanks! That worked
