-
Notifications
You must be signed in to change notification settings - Fork 7.6k
SOLUTION to -1 pin assignment causing apps wont start #6737
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
Comments
And what is the expected result if you call |
understood, we have to define and properly check those pin is suitable for assignment before initialize the io. i am ok, close this if there is no other optional such as new NOTUSE pin definition to be use in other library as indication the pin and peripheral are not in use to replace the -1. thanks! |
drawback on this error is, for custom pin mapping in such way CLASS.begin can have multiple parameters to set. we could not use CLASS.begin(pina,pinb,-1,-1) in case the pin is need to be set to default or not in use. if(pina,pinb,pinc,pind) instead of just: without and conditional check |
another valid scenario is when we have to use EN instead of GPIO when we dont want to use the pin. previously we set this pin to -1. |
Some pins do accept -1. Maybe only SDA/SCL and SCK/MISO/MOSI do not? @SuGlider PTAL |
I am starting to get issues raised for this -1 pin problem. Ideally digital pin ref -1 should be ignored and treated as a null pin. It is a shame that perfectly good libraries that are unlikely to be updated for a problem with single board package will be unusable with the ESP32 :-( Can the error messages be turned off by default in the Arduino IDE please? |
Hi @tsctrl, from reading this issue I am not sure if I got the point of it.
The library you sent, there is this option for setting -1 to unused the pin only for some specific pin, not for all. |
Any updates on this guys? |
I think that PR #7161 also addresses this issue. It would be good to create some Use Cases and then verify the different ways to run |
@tsctrl Closing this due to no answer for a long time. Feel free to reopen if needed :) |
Board
ESP32 Dev Module
Device Description
Devkit
Hardware Configuration
Any SPI, I2c MODULES
Version
v2.0.3
IDE Name
IDF Component, Arduino IDE
Operating System
Windows 10
Flash frequency
40MHz
PSRAM enabled
yes
Upload speed
115200
Description
-1 pin assignment causing apps wont start:
In the Arduino world an I/O pin number of -1 is OK to signify to a function that a pin allocation is not wanted, Lots of existing arduino library written this way. Recent update causing apps wont start with repeated error as below:
Would like to know the solution regarding this issue. This issue has been raised/mentioned in multiple esp arduino library.
Thanks!
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: