In the notify sketch this line of code in the loop() gives me an error.
pCharacteristic->setValue(&value, 1);
no instance of overloaded function matches the argument list. The second argument the value 1 is flagged. Also get candidate expects 1 argument, 2 provided. Wondering what the problem might be?
Also there is a difference in the libraries used in the code and those shown in the book.
I’m using VSC with PlatformIO.
Hi Charles.
That error means that the function setValue() only accepts one argument, but there are two arguments.
However, I’ve just tried the example in VS Code and it is working fine for me.
Did you add
#include <Arduino.h>
At the beginning of your sketch?
What is the version of the code that you are following? Always follow the code in the link. The link provides the most updated code. The eBook will be updated in the next release.
Regards,
Sara