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: mbed HeptaBattery SDFileSystem HeptaCamera_GPS Hepta9axis HeptaTemp HeptaXbee
Diff: main.cpp
- Revision:
- 19:58fb3ab94fbe
- Parent:
- 17:904bcb46a48d
- Child:
- 20:eb334313e2fe
--- a/main.cpp Fri Sep 08 17:58:11 2017 +0000 +++ b/main.cpp Sat Sep 09 06:58:06 2017 +0000 @@ -7,6 +7,7 @@ SDFileSystem sd(p5, p6, p7, p8, "sd"); HeptaXbee xbee(p9,p10); HeptaTemp temper(p17); +Timer tt; int main() { @@ -21,12 +22,17 @@ pc.printf("Command Get %d\r\n",rcmd); if(rcmd == 'a') { while(1) { - FILE *fp = fopen("/sd/mydir/test_thermal.txt", "a"); + tt.start(); + FILE *fp = fopen("/sd/mydir/test_thermal.csv", "a"); temper.temp_sensing_vol(&voltage); - pc.printf("Volt = %f\r\n",voltage); + xbee.printf("Volt = %f\r\n",voltage); fprintf(fp,"%f\r\n",voltage); fclose(fp); - wait(0.5); + wait(0.45242); + float timer = tt.read(); + xbee.printf("Time =%f\r\n",timer); + tt.stop(); + tt.reset(); } xbee.initialize(); } @@ -39,6 +45,7 @@ fprintf(fp, "\n\rHello World!\n\r"); pc.printf("SD Check Complete!!\r\n"); fclose(fp); + remove("/sd/mydir/test_thermal.csv"); } xbee.initialize(); }