When trying to compile Andy's example, I always receive the following error.. "no instance of constructor "mbed::DigitalIn::DigitalIn" matches the argument list" in file "DebounceInDebounceIn.h", Line: 95, Col: 135". Anyone have
a clue as to what this means? Should be straight forward I would think but it's eluding me. Thanks..
I am trying to acquaint myself w/ Andy Kirkhams DebounceIn library and having a problem with the example code below...
<<code>>
#include "mbed.h"
#include "DebounceIn.h"
DebounceIn d(p5);
DigitialOut led1(LED1);
DigitialOut led2(LED2);
int main() {
while(1) {
led1 = d;
led2 = d.read();
}
}
<</code>>
When trying to compile Andy's example, I always receive the following error.. "no instance of constructor "mbed::DigitalIn::DigitalIn" matches the argument list" in file "DebounceIn//DebounceIn.h", Line: 95, Col: 135". Anyone have
a clue as to what this means? Should be straight forward I would think but it's eluding me. Thanks..
And if you want you can also remove the const char *name = NULL part.
DebounceIn uses DigitalIn, and the DigitalIn constructor in DebounceIn is invalid in the newer mbed libraries.
Change in the DebounceIn code the following line:
<<code>>
DebounceIn(PinName pin, const char *name = NULL) : DigitalIn(pin, name) {...
to
DebounceIn(PinName pin, const char *name = NULL) : DigitalIn(pin) {...
<</code>>
And if you want you can also remove the const char *name = NULL part.
FYI I decided to test the new pull request feature by modifying the library and sending a pull request to Andy Kirkham. He accepted it, so if you either re-import the library, or click on the library -> update in your program you should get a new version which has the change in it.
FYI I decided to test the new pull request feature by modifying the library and sending a pull request to Andy Kirkham. He accepted it, so if you either re-import the library, or click on the library -> update in your program you should get a new version which has the change in it.
Important Information for this Arm website
This site uses cookies to store information on your computer.
By continuing to use our site, you consent to our cookies.
If you are not happy with the use of these cookies, please review our
Cookie Policy
to learn how they can be disabled.
By disabling cookies, some features of the site will not work.
Access Warning
You do not have the correct permissions to perform this operation.
I am trying to acquaint myself w/ Andy Kirkhams DebounceIn library and having a problem with the example code below...
When trying to compile Andy's example, I always receive the following error.. "no instance of constructor "mbed::DigitalIn::DigitalIn" matches the argument list" in file "DebounceInDebounceIn.h", Line: 95, Col: 135". Anyone have a clue as to what this means? Should be straight forward I would think but it's eluding me. Thanks..