Luke Plummer
/
LizardRecorder
filewriting program for second mbed
Revision 3:24f214dd6994, committed 2013-12-01
- Comitter:
- lukeplummer
- Date:
- Sun Dec 01 23:05:45 2013 +0000
- Parent:
- 2:4355e6305710
- Commit message:
- fixed again;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 4355e6305710 -r 24f214dd6994 main.cpp --- a/main.cpp Sun Dec 01 23:02:05 2013 +0000 +++ b/main.cpp Sun Dec 01 23:05:45 2013 +0000 @@ -13,7 +13,7 @@ FILE *fp = fopen("/local/OUT.csv", "w"); int main() { - fprintf(fp, "encoder 1, encoder 2, force 1, force 2, average force, current 1, current 2"); + fprintf(fp, "encoder 1, encoder 2, force 1, force 2, average force, current 1, current 2\n"); while (trigger.read() == 0) { //do nothing } @@ -25,7 +25,7 @@ float e1 = encoder1.getPulses()*2*3.14/1200.0; float e2 = encoder2.getPulses()*2*3.14/1200.0; - fprintf(fp, "%f, %f, %f, %f, %f, %f, %f", e1, e2, f1, f2, (f1+f2)/2.0, c1, c2); + fprintf(fp, "%f, %f, %f, %f, %f, %f, %f\n", e1, e2, f1, f2, (f1+f2)/2.0, c1, c2); } fclose(fp); }