Unina Corse EL / Mbed 2 deprecated f4_sd_imu_4

Dependencies:   SDFileSystem_conMOD mbed-rtos mbed

Fork of f4_sd_imu_4 by ratto killer

Committer:
NdA994
Date:
Wed Nov 22 21:45:19 2017 +0000
Revision:
4:58e4283f9a59
Parent:
3:3b2b8b0955f9
Child:
5:52d527a45a30
vrsione def ;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 0:bdbd3d6fc5d5 1 #include "mbed.h"
NdA994 2:f59bd5312559 2 #include "setting.h"
NdA994 2:f59bd5312559 3 #include "lettoreSD.h"
NdA994 3:3b2b8b0955f9 4 #include "accellerometro.h"
NdA994 3:3b2b8b0955f9 5
NdA994 3:3b2b8b0955f9 6 DigitalIn mybutton(USER_BUTTON);
NdA994 3:3b2b8b0955f9 7
mbed_official 0:bdbd3d6fc5d5 8 int main() {
NdA994 3:3b2b8b0955f9 9 init();
NdA994 3:3b2b8b0955f9 10 initFile();
NdA994 3:3b2b8b0955f9 11 initAccellerometro();
NdA994 3:3b2b8b0955f9 12 aperturaFile();
NdA994 3:3b2b8b0955f9 13 /*aperturaFile();
NdA994 2:f59bd5312559 14 for(int i=0; i<1000; i++){
NdA994 2:f59bd5312559 15 stampaFile("A1xxxxoooooggggggeeeeeeerrrryyyyynhgrgr#2\r\n");
NdA994 3:3b2b8b0955f9 16 }
NdA994 2:f59bd5312559 17 chiusuraFile();
NdA994 2:f59bd5312559 18 printf("Goodbye World!\n\r");
NdA994 3:3b2b8b0955f9 19 raccoltaDati();*/
NdA994 3:3b2b8b0955f9 20 Timer timer;
NdA994 3:3b2b8b0955f9 21 while(1){
NdA994 4:58e4283f9a59 22 timer.start();
NdA994 3:3b2b8b0955f9 23 raccoltaDati();
NdA994 4:58e4283f9a59 24 //stampaFile("A1xxxxoooooggggggeeeeeeerrrryyyyynhgrgr#2\r\n");
NdA994 4:58e4283f9a59 25 fprintf(fp, "A1xxxxoooooggggggeeeeeeerrrryyyyynhgrgr#2\r\n");
NdA994 4:58e4283f9a59 26 timer.stop();
NdA994 4:58e4283f9a59 27 if(timer.read_ms()>100){
NdA994 4:58e4283f9a59 28 printf("tempo: %f\n\r", timer.read());
NdA994 4:58e4283f9a59 29 }
NdA994 4:58e4283f9a59 30 else{
NdA994 4:58e4283f9a59 31 wait_ms(100-timer.read_ms());
NdA994 4:58e4283f9a59 32 }
NdA994 4:58e4283f9a59 33 timer.reset();
NdA994 4:58e4283f9a59 34 if (mybutton == 0) {
NdA994 4:58e4283f9a59 35 chiusuraFile();
NdA994 4:58e4283f9a59 36 aperturaFile();
NdA994 4:58e4283f9a59 37 wait(1);
NdA994 4:58e4283f9a59 38 }
NdA994 4:58e4283f9a59 39
NdA994 4:58e4283f9a59 40 /*if(i%100==99){
NdA994 3:3b2b8b0955f9 41 timer.stop();
NdA994 3:3b2b8b0955f9 42 float tempo = 1 - timer.read();
NdA994 3:3b2b8b0955f9 43 wait(tempo);
NdA994 3:3b2b8b0955f9 44 printf("tempo: %f\n\r", tempo + timer.read());
NdA994 3:3b2b8b0955f9 45 timer.reset();
NdA994 3:3b2b8b0955f9 46 timer.start();
NdA994 3:3b2b8b0955f9 47 }
NdA994 4:58e4283f9a59 48 i++;*/
NdA994 4:58e4283f9a59 49
NdA994 3:3b2b8b0955f9 50 }
mbed_official 0:bdbd3d6fc5d5 51 }