I'd like to make system() calls in Arduino sketches with dynamic values.
String dateCmd="date +'%Y%m%d %H:%M:%S' -s ";
dateCmd+="'20150120 10:42:00'";
system(dateCmd);
However it generates an error:
error: cannot convert 'String' to 'const char*' for argument '1' to 'int system(const char*)'
I've tried to use c_str() method of String, but it doesn't exist.
What shoud I do to get it to work?