Hello,
when i need to write some data to sdcard, why the USB stop working as image attached?
my code was:
while(1) {
while(gps.readable()) {
myled = 1;
char_gps = gps.getc();
tgps.encode(char_gps);
read_gps = true;
}
if(read_gps){
myled = 0;
read_gps = false;
tgps.f_get_position(&flat, &flon, &age);
FILE *fp = fopen(“/sd/tes.txt”,“a”);
if(fp!=NULL){
sprintf(data,“%f,%f\r\n”, flat, flon);
fprintf(fp,data);
fclose(fp);
}
}
}
if the sdcard is not inserted, the program running well, but when i insert the sdcard, it suddenly stop working.