# Set opacity when wifi is on

**URL:** <http://forum.squareline.io/t/set-opacity-when-wifi-is-on/3982>\
**Category:** How to\
**Created:** [November 5, 2024, 5:33pm UTC](http://forum.squareline.io/t/set-opacity-when-wifi-is-on/3982 "2024-11-05T17:33:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![florian](http://forum.squareline.io/user_avatar/forum.squareline.io/florian/32/1591_2.png) [@florian](http://forum.squareline.io/u/florian)\
**Post date:** [November 5, 2024, 5:33pm UTC](http://forum.squareline.io/t/set-opacity-when-wifi-is-on/3982/1 "2024-11-05T17:33:53Z")

</div>

### What do you want to achieve?

Hi all,  
i would like set opacity of wifi logo when this is connected,

i’m a newbie, and i don’t know where and how i can change my code to active this  
wifi is on my ui.ino but the event is in ui.c  
thanks for your help.

### What have you tried so far?

```auto
void ui_event_wifiOn(lv_event_t * e)
{
    lv_event_code_t event_code = lv_event_get_code(e);

    if(status == 3) {
        _ui_opacity_set(ui_wifiOn, 255);
    }
}

```

### Screenshot or video

### Others

- **SquareLine Studio version: 1.5**
- **Operating system:Windows 10**
- **Target hardware:ESP32-S3 1.28 touch**

---

<div class="post-metadata">

**Author:** ![Marian\_M](http://forum.squareline.io/letter_avatar_proxy/v4/letter/m/4af34b/32.png) [@Marian\_M](http://forum.squareline.io/u/Marian_M)\
**Post date:** [November 6, 2024, 1:09pm UTC](http://forum.squareline.io/t/set-opacity-when-wifi-is-on/3982/2 "2024-11-06T13:09:41Z")

</div>

And wha is problem?

---

<div class="post-metadata">

**Author:** ![florian](http://forum.squareline.io/user_avatar/forum.squareline.io/florian/32/1591_2.png) [@florian](http://forum.squareline.io/u/florian)\
**Post date:** [November 6, 2024, 1:44pm UTC](http://forum.squareline.io/t/set-opacity-when-wifi-is-on/3982/3 "2024-11-06T13:44:44Z")

</div>

Since 1week, i didn’t know how change my code to active icon on LVGL with my librarie Wifi on ui.ino  
but yesterday i have try with chatgpt and it’s ok know, i have understand how to create an external int on my ui.c and call this on my ino file,

today my icon is active when wifi is connected, and i have needle synchronize with ntp hour for my clock too.

i can share this project on an another thread in this forum.
