I am trying to set value of slider by using set_value functions of slider but that function works in setup but not in main loop

I have tried changing the value directly in main loop and incrementing it after certain intervals that doesn’t work screen is not responding to increment calls

You didn’t share a code snippet, so I can only give you some tips. It’s worth checking if you really use a global/static variable for the counter that is displayed through the slider. Or if in the loop you first get the value from the slider with lv_slider_get_value() function you can use it as a base to increment by lv_slider_set_value() function (with LV_ANIM_OFF if you update it at a fast pace). So it all depends on your selected approach… LVGL should update the slider when it’s value changes if your main loop really runs and calls lv_task_handler() periodically, and drawing works (i.e. other widgets like buttons/spinners/etc. are updated/animated fine).