Closed joysfera closed 3 years ago
Yeah, it's an unfortunate side-effect of trying to make the constructor a little more flexible and consistent. The C++ compiler cannot distinguish between a nullptr
and 0
. The solution is:
AceButton button((uint8_t) PIN);
or
const uint8_t PIN = 0;
See the Warning section towards the end of https://github.com/bxparks/AceButton#AceButtonClass
[Edit; Add alternate solution using const uint8_t PIN = 0
.]
try
compiler will complain
call of overloaded 'AceButton(int)' is ambiguous