I have this error:
cannot convert 'String' to 'char*' for argument '1' to 'int sprintf(char*, const char*, ...)'
I have this error:
cannot convert 'String' to 'char*' for argument '1' to 'int sprintf(char*, const char*, ...)'
The compiler told you what is wrong with your incomplete and badly-posted code.
mydata is a String and not...
char mydata[...];