Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
A beginner's question for you. I am using a serial instance called "pc":
Serial pc(USBTX, USBRX);
I can't seem to print out my actual variable values using the printf command. For instance, if I have an unsigned integer variable "foo", then I want to print it out to the PC terminal:
pc.printf(foo);
But this gives me an error:
Argument of type "unsigned int" is incompatible with parameter of type "const char *"
I believe that several MBed examples use the printf statement like this to print out a variable to the terminal screen. What am I doing wrong here?