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

Selectable Pins for LED Disp and Sensors - Enhancement #79

Closed
rellis-erigon opened this issue Oct 17, 2021 · 3 comments · Fixed by #94
Closed

Selectable Pins for LED Disp and Sensors - Enhancement #79

rellis-erigon opened this issue Oct 17, 2021 · 3 comments · Fixed by #94
Labels
enhancement New feature or request

Comments

@rellis-erigon
Copy link

A+ for the recent Updats. Is it possible to have a selective Pin for the LED Display and othe sensors. I note the common pin for the Wemos D1 Mini shield uses D4 the same as the LED display currently. https://hobbycomponents.com/shields/868-wemos-d1-mini-dht-temphum-shield.

@o0shojo0o o0shojo0o added the enhancement New feature or request label Oct 17, 2021
@miccgn
Copy link
Contributor

miccgn commented Dec 1, 2021

+1 from me as well. I'd love to create an option which allows to shift the D8 pin to D5, as this would allow to re-use components from AWTRIX project (AWTRIX PCB expects DFPlayer on D5).
I am eager to extend the .ino code, however, I have no idea how to extend the WebUi.

@miccgn
Copy link
Contributor

miccgn commented Dec 3, 2021

I started modifying the source in order to make the pin assignments dynamic. I made quite a lot progress for the sensors. However, when I came across the matrix pin, I had to learn that this cannot be done dynamically on a ESP8266.

The following discussion explains the reasons behind this:
FastLED/FastLED#1137
To summarize: in order to gain the required speed even on an ESP8266, the FastLED library tries to make as little decisions during runtime as possible. One of these decisions is the pin used. The pin can only be changed when the software is being compiled.

The only option would be to create as many FastLED objects within the program as pins should be available, then decide dynamically which one to use. Disadvantage of that solution: it consumes quite a lot memory.

Given that @o0shojo0o even moved the webui to github rather than keeping it on flash and in memory, I suppose memory will be an issue.

So, I will try to finish my work on dynamic pins for sensors during the next couple of days and upload the code as PR, which allows @o0shojo0o to decide whether to accept my modifications or not. But LEDs will remain assigned to D4.

@miccgn
Copy link
Contributor

miccgn commented Dec 4, 2021

I have finished working on the pin assignment version.
However, I think I might have mixed up my repository, basing the new version on 0.3.14 then merging and reverting, rather than basing it on my recent PR.
@o0shojo0o I guess it would be easiest if you could decide on my recent PR, then I will create a new PR for the pin assignment version.

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

Successfully merging a pull request may close this issue.

3 participants