Skip to content

BTNPIN flag does not work for multiple buttons #3792

Closed

Description

@ZOUDIO

What happened?

The BTNPIN flag does not seem to be working for multiple pins. Only the first pin gets added.

To Reproduce Bug

I used the buildflag '-D BTNPIN=14,32' but only 14 shows up in the GUI
button

Expected Behavior

I would expect multiple buttons to be initialized and visible in the web GUI.

Install Method

Self-Compiled

What version of WLED?

v0.14.1

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

-

Anything else?

I used the same type of buildflag for multiple LED output pins, and this is working:
-D DATA_PINS=2,4,12,13,15,17

So it is specifically related to this build flag it seems

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added
    confirmed
    on Mar 4, 2024
  2. added a commit that references this issue on Mar 5, 2024
  3. added
    fixed in source
    on Mar 5, 2024
  4. blazoncek commented on Mar 22, 2024

    @blazoncek
    Contributor

    Available in 0.15.0 beta 1.

  5. Arcitec commented on Apr 2, 2025

    @Arcitec
    Contributor

    @ZOUDIO Your example is missing BTNTYPE. You must set that too, if you want to pre-compile multiple pins. Otherwise the other button pins will default to "disabled".

    Check the source code for values, but the most common value is 2 (Pushbutton), so in your case (where you wanted to pre-add two buttons), you would have to do:

      -D WLED_MAX_BUTTONS=2
      -D BTNPIN=14,32
      -D BTNTYPE=2,2
  6. added a commit that references this issue on Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugconfirmedfixed in source

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions