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_motore mbed
Fork of SDFileSystem_HelloWorld by
Revision 3:4d9b3d817b27, committed 2018-02-09
- Comitter:
- NdA994
- Date:
- Fri Feb 09 15:51:34 2018 +0000
- Parent:
- 2:88534a51c2b4
- Commit message:
- funziona;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Feb 09 11:57:16 2018 +0000
+++ b/main.cpp Fri Feb 09 15:51:34 2018 +0000
@@ -8,9 +8,12 @@
Serial pc(USBTX, USBRX); // tx, rx
SDFileSystem sd(A6, A5, A4, A3, "sd"); // the pinout on the mbed Cool Components workshop board
+int n = 0;
FILE *fp;
+DigitalIn mybutton(D1);
+
int rpm;
typedef struct {
@@ -86,6 +89,15 @@
if((can.rderror()+can.tderror()))pc.printf("Errori! : rd: %d\t td: %d\r\n",can.rderror(),can.tderror());
wait_us(10);
}
+ if (mybutton == 0) {
+ //chiusuraFile();
+ //aperturaFile();
+ //fprintf(fp, "###########FLAG MARCATORE PRESSIONE PULSANTE############\r\n");
+ fprintf(fp, "NN %d\n\r", n);
+ printf("flag\n\r");
+ n++;
+ wait(1);
+ }
}
//fclose(fp);
