Skip to content

Sorry, pins [X, X, X ...] can't be used. #4208

Closed

Description

@Jo5cha

What happened?

Bug:
I made a personal usermod with 0.14. and everything worked fine but then changed WLED to 0.15.0-b6 and suddenly one rotary encoder was not working anymore and if I tried to change some LED Pins in the WLED UI I've got the above Error-Message: "Sorry, Pins [5, 7, 8, 9, 10, 11, 24, 28, 29, 30, 31, 32, 15, 14] can't be used."

Solution/Workaround:
It took me resoldering of 7 wires and destroying one rotary encoder to realize that (at least part of) the issue lies in the Audireactive Usermod which is now implemented from the start.
The usermod has a microphone setting where 4-5 wires are pre defined and thus blocking pins which have formerly been used by my usermod.
Changing these pins manually back to not assigned got rid of the problem.

Its actually quite an easy fix in the end but took me long time to figure out to look in the audioreactive settings. And hopefully will help others who are having the same issue.

Fix:
Audioreactive Pins should be set to "not assigned" (or what the wording is here) by default.
Thank you.

To Reproduce Bug

Installing the new beta and importing usermods and settings from a previous Version.

Expected Behavior

Audioreactive Usermod should have Pins assigned to -1 / not assigned

Install Method

Self-Compiled

What version of WLED?

0.15.0-b6

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

No response

Anything else?

No response

Code of Conduct

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

Activity

  1. softhack007 commented on Oct 18, 2024

    @softhack007
    Member

    Thanks for pointing out this topic!

    The usermod has a microphone setting where 4-5 wires are pre defined and thus blocking pins

    (small correction - audioreactive allocates 3 wires/pins if you don't modify the defaults)

    Its a general design policy for WLED - all PINs are allocated at startup. This is true for any usermod, and also true for relay, IR, buttons, and I2C pins. We might need to rethink this (0.16 ?), and only run the "setup()" when a usermod is enabled. However this requires a redesign of the usermodManager component.

    Fix:
    Audioreactive Pins should be set to "not assigned" (or what the wording is here) by default.
    Thank you.

    Edit: setting PIN defaults to "not assigned" is not a good solution, because many users who want to connect an I2S mic would be asking lots of support questions if we would not provide recommended defaults.

  2. added
    documentation
    and removed on Oct 18, 2024
  3. Jo5cha commented on Oct 18, 2024

    @Jo5cha
    Author

    You got actually a very valid point. Thanks for the reply.
    It's also a really easy fix if you know where to look. So maybe just keep it like that and have this post as hint for people encountering the same issue. ;)

  4. added
    workaround
    and removed on Oct 18, 2024
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

    documentationwontfixworkaround

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions