# Change LED brightness

**URL:** <https://community.thunkable.com/t/change-led-brightness/523753>\
**Category:** Questions about Thunkable X\
**Created:** [March 19, 2020, 3:14pm UTC](https://community.thunkable.com/t/change-led-brightness/523753 "2020-03-19T15:14:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![john271737miht1p](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@john271737miht1p](https://community.thunkable.com/u/john271737miht1p)\
**Post date:** [March 19, 2020, 3:14pm UTC](https://community.thunkable.com/t/change-led-brightness/523753/1 "2020-03-19T15:14:43Z")

</div>

Hi, I am experiencing issues with the "slider " in thunkable.  
The thing is, I am trying to create a project that use my own app on the phone to control the brightness of a LED bulb that connects to arduino through bluetooth. my idea is to use slider to control the brightness. The slider value range is set from 0 to 255, and I already successfully make my app connect to the HM-10 BLE module, but the issue is, my slider is not controlling the led. Can any one help me to debug this slider issue please ?

 ![Block diagram](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/5/6519207c23d478a45e63499d7917c711d228eadb.png)

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [March 19, 2020, 3:37pm UTC](https://community.thunkable.com/t/change-led-brightness/523753/2 "2020-03-19T15:37:05Z")

</div>

Hi @john271737miht1p

I see that for the `data` input your are using Light1.getValue and in `Label2` you are simply using the “value” from the `onValueChange` event.

You also seem to be doing rounding in the latter, but not the former.

To start with the troucleshooting, can you confirm if you can use buttons to send 0 and 255 to to turn the LED on/off?

Thanks

---

<div class="post-metadata">

**Author:** ![john271737miht1p](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@john271737miht1p](https://community.thunkable.com/u/john271737miht1p)\
**Post date:** [March 19, 2020, 6:03pm UTC](https://community.thunkable.com/t/change-led-brightness/523753/5 "2020-03-19T18:03:08Z")

</div>

I am making a new app to test it by giving numbers only . I will let you know.

Hello, I tried to build a brand new app that use only single number to control the led on and off, and it worked.

---

<div class="post-metadata">

**Author:** ![john271737miht1p](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@john271737miht1p](https://community.thunkable.com/u/john271737miht1p)\
**Post date:** [March 19, 2020, 9:23pm UTC](https://community.thunkable.com/t/change-led-brightness/523753/6 "2020-03-19T21:23:54Z")

</div>

Can you please continue to help me with the slider issue please ?

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [March 19, 2020, 9:31pm UTC](https://community.thunkable.com/t/change-led-brightness/523753/7 "2020-03-19T21:31:25Z")

</div>

Add a slider and app variable. Set the slider max to = 255  
Min= o

Step = 25.5

Remove the “round” math block

On slider value change, set variable as value

Use that variable instead of the from light1 get value block here as you have shown.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/b/1b0361e69dfe5952697a5918f81193af450c3e0f.jpeg)

Or move this green value block here and try it

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/8/48276fc3eb78988f47fa06a73664e7ebe0b1b172.jpeg)

---

<div class="post-metadata">

**Author:** ![john271737miht1p](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@john271737miht1p](https://community.thunkable.com/u/john271737miht1p)\
**Post date:** [March 19, 2020, 9:52pm UTC](https://community.thunkable.com/t/change-led-brightness/523753/9 "2020-03-19T21:52:38Z")

</div>

So I should use 2 sliders to control one led ?

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [March 19, 2020, 10:20pm UTC](https://community.thunkable.com/t/change-led-brightness/523753/10 "2020-03-19T22:20:13Z")

</div>

can you try this one?

 ![Screen Shot 2020-03-19 at 6.08.50 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/0/50968ed8c445de0f6102e0632ab3ed7ea1c41c43.png)

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [April 30, 2022, 3:06pm UTC](https://community.thunkable.com/t/change-led-brightness/523753/11 "2022-04-30T15:06:53Z")

</div>

A post was split to a new topic: [Can I adjust the brightness of my devices flashlight?](https://community.thunkable.com/t/can-i-adjust-the-brightness-of-my-devices-flashlight/1856360)

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:39am UTC](https://community.thunkable.com/t/change-led-brightness/523753/12 "2024-11-08T11:39:45Z")

</div>


