I’m getting ‘too many arguments’ error now. Just for reference, all I’m doing here is spitting out to Teleterm the codes and data from the remote control for debugging/dev purposes. Under normal operation, this is disabled (I am using mbed LPC1114).
There are just two parametr - a buffer of chars and its size. So there is not possible to do something similar like with printf function. So you need something like this - cplusplus.com/reference/cstdio/sprintf/
And code will look like this
char buffer [50];
int n, a=5, b=3;
n=sprintf (buffer, "%d plus %d is %d", a, b, a+b);
pc.write(&buffer, n);
But I believe the guy with the chatGPT will explain it better again