Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SDFileSystem mbed
Fork of SDFileSystem_HelloWorld by
Revision 3:b7f9b01dde7a, committed 2018-03-18
- Comitter:
 - Yukina
 - Date:
 - Sun Mar 18 09:10:30 2018 +0000
 - Parent:
 - 2:a44adae14658
 - Commit message:
 - write "\r"
 
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file | 
--- a/main.cpp	Sat Mar 10 05:26:06 2018 +0000
+++ b/main.cpp	Sun Mar 18 09:10:30 2018 +0000
@@ -11,12 +11,12 @@
     FILE *bp = fopen("/sd/mydir/data.bin","rb");
     FILE *fp = fopen("/sd/mydir/data.txt","w");
 
-    fprintf(fp,"time,acc[x],acc[y],acc[z],gyr[x],gyr[y],gyr[z]\n");
+    fprintf(fp,"time,acc[x],acc[y],acc[z],gyr[x],gyr[y],gyr[z]\r\n");
     
     /*  読み出したデータが0個でなければテキストファイルに書き込み   */
     while(fread(&Data,sizeof(float),7,bp) != 0){
         printf("please wait\r");    //時間がかかったとき用
-        fprintf(fp,"%f,%f,%f,%f,%f,%f,%f\n",Data[0],Data[1],Data[2],Data[3],Data[4],Data[5],Data[6]);
+        fprintf(fp,"%f,%f,%f,%f,%f,%f,%f\r\n",Data[0],Data[1],Data[2],Data[3],Data[4],Data[5],Data[6]);
     }
 
     /*  ファイルクローズ    */
    