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
I have seen some examples that has the printf command in the code.
<<code>>
printf("Opening File...\n");
<</code>>
for example in this piece of code from the handbook localfilesystem, where does the text "Opening File...\n" go? Which screen, serial or usb?
<<code>>
#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);
<</code>>
regards
Torfinn Sørnes
This site uses cookies to store information on your computer.
By continuing to use our site, you consent to our cookies.
If you are not happy with the use of these cookies, please review our
Cookie Policy
to learn how they can be disabled.
By disabling cookies, some features of the site will not work.
Access Warning
You do not have the correct permissions to perform this operation.
I have seen some examples that has the printf command in the code.
for example in this piece of code from the handbook localfilesystem, where does the text "Opening File...\n" go? Which screen, serial or usb?
regards Torfinn Sørnes