This is a repository for code relating to mbed Fitness Tracker
Dependencies: mbed PulseSensor2 SCP1000 mbed-rtos 4DGL-uLCD-SE LSM9DS1_Library_cal PinDetect FatFileSystemCpp GP-20U7
Revision 29:b0ccbf3c7b4c, committed 2020-04-20
- Comitter:
- Richard_Xiong
- Date:
- Mon Apr 20 22:46:03 2020 +0000
- Parent:
- 28:240f3e28018c
- Child:
- 30:eb4640146f45
- Commit message:
- SDcardTest File Added
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SDFileSystem.lib Mon Apr 20 22:46:03 2020 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/SDFileSystem/#8db0d3b02cec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SDcardTest.cpp Mon Apr 20 22:46:03 2020 +0000 @@ -0,0 +1,31 @@ + +#include "mbed.h" +#include "SDFileSystem.h" + +SDFileSystem sd(p5, p6, p7, p8, "sd"); // the pinout on the mbed Cool Components workshop board +Serial pc(USBTX,USBRX); + + +float y[100]; +char x[100],z[100]; + + + +int main() { + + + FILE *fp = fopen("/sd/text1.txt", "r"); + if(fp == NULL) { + error("Could not open file for write\n"); + } + //fprintf(fp, "Hello fun SD Card World!"); + for (int i = 0; i<10;i++) + { + fscanf(fp,"%s\t%f\t%s\r\n",&x[0],&y[i],&z[0]); + pc.printf("%s %f %s \r\n",x,y[i],z); + } + + fclose(fp); + + +} \ No newline at end of file
--- a/mbed-rtos.lib Mon Apr 20 00:22:18 2020 +0000 +++ b/mbed-rtos.lib Mon Apr 20 22:46:03 2020 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/users/mbed_official/code/mbed-rtos/#58563e6cba1e +https://os.mbed.com/users/mbed_official/code/mbed-rtos/#5713cbbdb706