No Matching function error for SerialCommand SCmd; // The demo SerialCommand object

My first Ardunio project; quad spider robot; nano. I think I have the needed libraries but getting error message for "SerialCommand SCmd". It does not seem to be a library item.

Can you help? Thanks

*#include <Servo.h> //to define and control servos
*#include <FlexiTimer2.h>//to set a timer to manage all servos
*// RegisHsu, remote control
*#include <SerialCommand.h>
*SerialCommand SCmd; // The demo SerialCommand object

My error message is "no matching function for call to "SerialCommand::addCommand(cost char {2]. void (&)())' "

What's a cost char? Or {2]. ?

I have my IDE font set to 18 pixels and use whitespace to make it Easier to Read.

What are you trying to pass to .addCommand()? I'm guessing you are passing a two-character array but the function is expecting something else.

The library is expecting a const character pointer:
void addCommand(const char *command, void(*function)());

Thanks Johnwasser for your reply. I have found an alternate sketch that does not refer to the library that was giving a problem. I think I'm ok now.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.