Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add a button to cycle through Preset Favourites #1619

Closed
comtsamsmith opened this issue Jan 4, 2021 · 13 comments
Closed

How to add a button to cycle through Preset Favourites #1619

comtsamsmith opened this issue Jan 4, 2021 · 13 comments
Labels

Comments

@comtsamsmith
Copy link

I want to put a flashing row of LEDs to my son's bike. It would be really nice to set some preset patterns and then wire a button to cycle through the presents (No WiFi on the road).

Is that possible without me having to change the code?

I would guess it does it on one of the spare inputs but cannot see anything in the documentation.

@w00000dy
Copy link
Contributor

w00000dy commented Jan 8, 2021

WLED does support a button. Connect a normally open pushbutton to GPIO0 (NodeMCU/Wemos pin D3) and ground.
In settings you can configure your button:
grafik

@comtsamsmith
Copy link
Author

Thanks for that I will try it.

@w00000dy
Copy link
Contributor

w00000dy commented Jan 8, 2021

Alternatively WLED also can create a wifi network so you can connect to WLED also on the road.

@w00000dy
Copy link
Contributor

Any news?

@comtsamsmith
Copy link
Author

No sorry, cause I have not had any time to try it. I gues that will only do the three presets. But thanks for the tip.

I did find a in a video at 19 mins in this bloke explain how to cycle through the presents using a button to activate a macro.
https://www.youtube.com/watch?v=6eCE2BpLaUQ&t=922s&ab_channel=DrZzs

@Diranar
Copy link

Diranar commented May 5, 2021

No sorry, cause I have not had any time to try it. I gues that will only do the three presets. But thanks for the tip.

I did find a in a video at 19 mins in this bloke explain how to cycle through the presents using a button to activate a macro.
https://www.youtube.com/watch?v=6eCE2BpLaUQ&t=922s&ab_channel=DrZzs

This works like a Charm with Version 0.10.2. But will NOT work with all newer Versions, cause now you can only assign 3 different Presets to the Button, but can't change to the next Preset cause this is no longer supported or is broken.

@kdegraaf
Copy link

kdegraaf commented Jul 22, 2021

The following nasty hack worked for me on v0.12.0 build 2104020:

  1. Create preset, uncheck "Overwrite with state", API command "win&P1=1&P2=5PL=~", save to ID 250. (Replace the values of P1 and P2 with the first and last "real" preset IDs. In my case, I have "real" presets on IDs 1, 2, 3, 4 and 5.)
  2. Config -> Time & Macros -> "Button short press Preset" -> 250
  3. Wire the button per the directions. (TL;DR: momentary SPST, normally open, across a digital pin and ground, pulled up to 3v3.)

Hopefully, v0.13 will make this easier, but I'm not inclined to mess with the betas.

Good luck!

@Mikprice
Copy link

oh my god thank you SO much @kdegraf !!! This is exactly what i needed, been looking for quite some time...
I use Wled in the speedometer of my car, and needed a way to easily cycle through different colors without always needing to connect my phone first. This works perfect!

@dkebler
Copy link

dkebler commented Aug 16, 2021

I'm using .13 beta 2 and this still works. No documentation on this so no way to know if the devs have made this easier although this really isn't a nasty hack

@epchris
Copy link

epchris commented Feb 2, 2022

  1. win&P1=1&P2=5PL=~

Kevin! I went to college with you :)
This super helpful tip got me on the right path and I wanted to thank you

@kdegraaf

@blazoncek
Copy link
Collaborator

Hopefully, v0.13 will make this easier, but I'm not inclined to mess with the betas.

Every software is beta nowadays. If you are wondering, 0.12 has more bugs than 0.13-b6. Nastier too. 😉

@blazoncek
Copy link
Collaborator

For future reference: https://kno.wled.ge/interfaces/http-api/#presets
Closing.

@loverboyritesh
Copy link

Thanks @comtsamsmith ... for asking this question, this was something i also needed and looking for .And
Thanks @kdegraaf ... For your Awesome trick..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants