Wled: Button support for dimming up and down brightness

Created on 5 Aug 2019  路  20Comments  路  Source: Aircoookie/WLED

Hi there,
first of all, Thanks for that great piece of code. I tested many WS28xx Codes for ESPs but none of them is so amazing than WLED.
I got on little question regarding Buttons: Is it possible to dim up and down with a button?
For Example:
Long press -->Dim up until release
Long press again-->Dim down until release

Also is it possible to switch through the effects with a button?
For example:
Press button-->Effect 1
Press button-->Effect 2
and so on

Thanks in advance

enhancement

Most helpful comment

Hi!
I'm glad that you like WLED!
Dimming with the button is not supported, however I believe that it is a great idea, so I will add it soon!

For switching through the effects, go to time settings and change these settings:
mcr1

mcr2

Then you can step through the effects with a single click and turn on/off with a long press.

All 20 comments

Hi!
I'm glad that you like WLED!
Dimming with the button is not supported, however I believe that it is a great idea, so I will add it soon!

For switching through the effects, go to time settings and change these settings:
mcr1

mcr2

Then you can step through the effects with a single click and turn on/off with a long press.

Hey, just tried this, exactly like the pictures shows. But only Longpress works for on/off. Switching trough the FX-Mopdes doesn麓t work. On shortpress nothing happens.

@Beliar-666 If you use your browser to enter http://_DeviceIP_/&win&M=1 does it cycle through the effects successfully? After the first time you should just be able to refresh the browser to get it to continue cycling the effects. This works for me and assigning it to any button press (short | long | double) seems to work flawlessly, it evens wraps from last to first effect. Would you post the results of http://_DeviceIP_/json/info to aid in diagnostics.

@brentbrooks70 no, it wont work with http://DeviceIP/&win&M=1 and http://DeviceIP/json/info only says not found. i麓ve 083 cause all other versions won麓t work for me. i ever get bootloops with 084 or 085.

@Beliar-666 Looking through some of the commits it looks like there were some changes between 0.8.3 & 0.8.4 having to do with the button and AP102 compatibility. Do you compile your own code or run precompiled binaries? If you are compiling, what IDE and version, what platform (8266 or 32) and its associated core version, the version (VID) of the code (can be found in WLED00.ino in date format)? You could also look in NpbWrapper.h for the BTNPIN definition and make sure it appears correct. I am sure I have forgotten to ask something, hopefully this will either point you in the right direction or when you answer the above info I might be able to help more.

0.8.4 both tried. the downloadable bin and self compiled. Both have the same error after upload. My LEDs light up and the flashes white mixed wit5h different colours, then light orange, and so on. so it seems the node mcu 8266 reboots all thje time. 0.8.5 is self compiled. after flash i short get into the Frontend and then also reboots. Tested with 3 Nodemcus. The 0.8.3 runs without error, but has no json.

I got the error i had. The reboots were caused by mqtt. The settings and datapoints in my Homeautomation from wled 0.8.3 caused the reboots. Turned off mqtt in my automation, deleted the datapoints from wled 0.8.3 restarted mqtt and everything is fine.Now i again have the same datapoints without any errors.

hello all,

Do you have an schemtic to connect a button.

sorry, i want to connect a button to my nodemcu v3 so i can scroll trough the effect. i tried it with a pull up resistor but it will not work. i think i do somthing wrong and that's why i'am looking for a schematic. thanks in advance

Tell us what you do and we will see what happening, I have the button working.

511568b6ce395f1b40000000
I connected the button like this and used an pull up resistor 10k
I Also set the macro settings like setting at the top. But it does not working. I think i do something wrong. I hope you can help me. I like Wled00 very much!!

Wled00 connecting button

@Mariu86 how did you connect your button. Can you please give me more information about that ?

I will look in my setup today and I will send you a picture , I think I didn't use any resistor the node mcu hase a resistor build in .

@Ashok1900 my push button it's connected to my nodemcu directly to d3 and vin pin.

I will try it and let you know today.

@Mariu86 Yes it's working now. I thank you very much for your great support.

Is button brightness still likely to be implemented? I want to use wled for some camping lights, and would be great if i could turn the thing on/off and adjust brightness with a real life button (or buttons)

Hey! This issue has been open for quite some time without any new comments now. It will be closed automatically in a week if no further activity occurs.
Thank you for using WLED!

Button brightness adjustment added to list of things to do :)

Closing since the brightness on long press was also proposed in #760

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JoshWobbles picture JoshWobbles  路  3Comments

cemasss picture cemasss  路  3Comments

Legsmaniac picture Legsmaniac  路  3Comments

ArJay60 picture ArJay60  路  3Comments

exeljb picture exeljb  路  4Comments