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:e7f77ec41f33, committed 2017-09-04
- Comitter:
- Joeatsumi
- Date:
- Mon Sep 04 06:41:39 2017 +0000
- Parent:
- 2:f8284afcee36
- Commit message:
- ???????????50ms???????????1000ms???????????sd????????????????????
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Sep 03 01:40:21 2017 +0000
+++ b/main.cpp Mon Sep 04 06:41:39 2017 +0000
@@ -12,7 +12,8 @@
int count =0;//最初はTimeLog[0]から始まる
-static unsigned long TimeLog[20];//20個の要素を「箱」を用意する
+//static unsigned long TimeLog[20];//20個の要素を「箱」を用意する
+static unsigned long TimeLog[20];//10個の要素を「箱」を用意する
unsigned long nowTime = 0;
void SD(){//この関数を0.05秒ごとに呼び出して、その度に経過時間をTimeLog[]に代入する。
@@ -39,7 +40,8 @@
if(fp == NULL) {
error("Could not open file for write\n");
}
- fprintf(fp, "%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n",TimeLog[0],TimeLog[1],TimeLog[2],TimeLog[3],TimeLog[4],TimeLog[5],TimeLog[6],TimeLog[7],TimeLog[8],TimeLog[9],TimeLog[10],TimeLog[11],TimeLog[12],TimeLog[13],TimeLog[14],TimeLog[15],TimeLog[16],TimeLog[17],TimeLog[18],TimeLog[19]);
+ fprintf(fp, "%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n%d\r\n",TimeLog[0],TimeLog[1],TimeLog[2],TimeLog[3],TimeLog[4],TimeLog[5],TimeLog[6],TimeLog[7],TimeLog[8],TimeLog[9]
+ ,TimeLog[10],TimeLog[11],TimeLog[12],TimeLog[13],TimeLog[14],TimeLog[15],TimeLog[16],TimeLog[17],TimeLog[18],TimeLog[19]);
myled1 = 1 ;
fclose(fp);
free(fp);
@@ -57,7 +59,7 @@
int main(){
Time.start();
sd_write.attach(&SD,0.05);//0.05秒ごとにSDという関数を発動し、割り込みする。
-
+
while(1){
nowTime = Time.read_ms();
}
