I’ve set up a QuinLed An-Penta mini. with WLED v0.15.0-b4 and an analogue strip. It works well. I want to use a physical push button to activate certain presets. I have set up the presets with IDs 1, 2 and 3 and they work fine when I click on the them in the WLED interface. I have connected the physical button to B1 and Gnd on the An-Penta-mini and have tested with the multimeter on the terminals of the An-Penta that pressing the button pulls the wire to ground. The Quinled pinout for the An-Penta mini gives Button_1 as being on GPIO_2. So, on the WLED LED Preferences page I have set Button 0 as GPIO 2 and Pushbutton. Then on the Time & Macros page I have set Button 0 Short=1, Long=2 and Double=3. I have saved and tested and it doesn’t work. WHAT HAVE I DONE WRONG?
Look here: Macros - WLED Project
You might need a pull up/down resistor to give the pin a defined signal (high or low). Since it’s connected to ground, you might also need to select “invert”.
Good luck.
Thanks for the suggestion. The Quinled pinout guide states that the button connections are “Pulled High, HW Debounce”. Doesn’t that mean that no resistor is needed because the GPIOs in question are already being pulled high internally by the esp32 itself? I tried the ‘push inverted’ option instead of ‘pushbutton’ on the WLED LED preferences page but the situation hasn’t changed.
Did you set button 0, or button 1. I believe button 0 is the onboard button, and has built in functions in WLED, like on/off, reset WiFi, and erase flash (factory reset). Try declaring your button as 1. Instead of using the 3 actions for that button, try
win&P1=1&P2=3&PL=~
This will cycle between preset 1 and 3.
I originally tried Button 0 but changed that to Button 1 after reading about the defaults (I didn’t want someone pressing the button for several seconds and factory resetting the esp32!) Neither 0 nor 1 have worked with the set up as described above. I want one click to toggle on/off, double click to cycle brightness increases and long press to cycle colour temperature (json doesn’t appear to work with CCT increases so I’ll set that up to use the win&P1=1&P2=3&PL=~ API you mention and create a series of presets with different temp levels). However, given the different effects I want to achieve with each type of button press it’s not appropriate in this case to cycle through the id1, id2 and id3 presets. The configuration process seems clear to me but it’s just not working which leads me to suspect some mechanical problem, although haven’t a clue what it is!