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_conMOD mbed-rtos mbed
Fork of f4_sd_imu_4 by
Diff: main.cpp
- Revision:
- 4:58e4283f9a59
- Parent:
- 3:3b2b8b0955f9
- Child:
- 5:52d527a45a30
--- a/main.cpp Wed Nov 22 02:41:36 2017 +0000 +++ b/main.cpp Wed Nov 22 21:45:19 2017 +0000 @@ -18,12 +18,26 @@ printf("Goodbye World!\n\r"); raccoltaDati();*/ Timer timer; - int i=0; - timer.start(); while(1){ + timer.start(); raccoltaDati(); - stampaFile("A1xxxxoooooggggggeeeeeeerrrryyyyynhgrgr#2\r\n"); - if(i%100==99){ + //stampaFile("A1xxxxoooooggggggeeeeeeerrrryyyyynhgrgr#2\r\n"); + fprintf(fp, "A1xxxxoooooggggggeeeeeeerrrryyyyynhgrgr#2\r\n"); + timer.stop(); + if(timer.read_ms()>100){ + printf("tempo: %f\n\r", timer.read()); + } + else{ + wait_ms(100-timer.read_ms()); + } + timer.reset(); + if (mybutton == 0) { + chiusuraFile(); + aperturaFile(); + wait(1); + } + + /*if(i%100==99){ timer.stop(); float tempo = 1 - timer.read(); wait(tempo); @@ -31,11 +45,7 @@ timer.reset(); timer.start(); } - i++; - if (mybutton == 0) { - chiusuraFile(); - aperturaFile(); - wait(0.5); - } + i++;*/ + } }