![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
02/07/15
Dependencies: mbed
Data.cpp@40:23008d8111d5, 2015-07-08 (annotated)
- Committer:
- ADAMSTRUTT
- Date:
- Wed Jul 08 10:48:12 2015 +0000
- Revision:
- 40:23008d8111d5
- Parent:
- 36:a2d20d5e5e19
- Child:
- 42:b9055f46cfed
Before lunch Wednesday
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ADAMSTRUTT | 35:085a674c9fdf | 1 | #include "mbed.h" |
ADAMSTRUTT | 35:085a674c9fdf | 2 | |
ADAMSTRUTT | 35:085a674c9fdf | 3 | LocalFileSystem local("local"); |
ADAMSTRUTT | 35:085a674c9fdf | 4 | |
ADAMSTRUTT | 36:a2d20d5e5e19 | 5 | void data(int sensor_number, int speed){ |
ADAMSTRUTT | 36:a2d20d5e5e19 | 6 | FILE *fp = fopen("/local/Data.xls", "w"); // Open "Data.txt" on the local file system for writing |
ADAMSTRUTT | 36:a2d20d5e5e19 | 7 | fprintf(fp, "Sensor Name\tTime\n"); |
ADAMSTRUTT | 40:23008d8111d5 | 8 | fprintf(fp, "Sensor %d\t%d\f",sensor_number, speed); |
ADAMSTRUTT | 35:085a674c9fdf | 9 | fclose(fp); |
ADAMSTRUTT | 35:085a674c9fdf | 10 | } |