Where does this text go?

16 Feb 2011

I have seen some examples that has the printf command in the code.

printf("Opening File...\n"); 

for example in this piece of code from the handbook localfilesystem, where does the text "Opening File...\n" go? Which screen, serial or usb?

#include "mbed.h"

LocalFileSystem local("local");

int main() {
	printf("Hello World!\n");
	
	wait(5.0);
	
	printf("Opening File...\n"); // Drive should be marked as removed
	FILE *fp = fopen("/local/test.txt", "w");
	if(!fp) {
		fprintf(stderr, "File /local/test.txt could not be opened!\n");
		exit(1);
	}
	
	wait(5.0);

regards Torfinn Sørnes

16 Feb 2011
16 Feb 2011

Welcome Torfinn,

Have a read of this: http://mbed.org/handbook/SerialPC and all should become clear.

Dan

02 Mar 2011

goes to USB PC serial port at 9600, N,8,1