-
Notifications
You must be signed in to change notification settings - Fork 38
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
GPIO pin 0 cannot be used? #40
Comments
Try This is caused by 2 overloaded constructors:
C++ maps a |
This stackoverlow suggests a way to disambiguate (https://stackoverflow.com/questions/4610503/how-to-resolve-ambiguity-of-call-to-overloaded-function-with-literal-0-and-point) but it's kinda ugly. Not sure I want to introduce that kind of clutter into the code. |
Okay, it's working now. That's not the way I usually do it, but it did the trick for me and I'm fine with it. Shall I close this issue now, or do you want to leave it open for suggestions from others? You can close it if you want to, I'm okay with that... |
…ution to disambiguate overloaded constructors 'AceButton(0)' (see #40)
Added notes in the README.md. |
It occurred to me that an alternative, perhaps cleaner, solution is to use a const: const uint8_t PIN = 0;
AceButton button(PIN); |
Trying to use AceButton on pin 0 gives me this error:
exit status 1
call of overloaded 'AceButton(int)' is ambiguous
All other pins are okay, except pin 0. What can be done about this?
The text was updated successfully, but these errors were encountered: