cltp(仮), 日本語があるので修正必要。
Dependencies: mbed HEPTA_CDH_lite LPS25HB_I2C
Diff: main.cpp
- Revision:
- 2:e181e5c64233
- Parent:
- 1:ddac5ec89167
- Child:
- 3:f64ab3adcac5
--- a/main.cpp Wed Aug 11 03:50:32 2021 +0000 +++ b/main.cpp Fri Aug 20 12:22:30 2021 +0000 @@ -1,19 +1,29 @@ #include "mbed.h" +#include "HEPTA_EPS.h" #include "HEPTA_CDH.h" HEPTA_CDH cdh(PB_5, PB_4, PB_3, PA_8, "sd"); +HEPTA_EPS eps(PA_0,PA_4); Serial pc(USBTX,USBRX,9600); int main() { - pc.printf("Hello World!\n"); - + float btvol; + char str[100]; mkdir("/sd/mydir", 0777); - - FILE *fp = fopen("/sd/mydir/sdtest.txt", "w"); + FILE *fp = fopen("/sd/mydir/data.txt", "w"); if(fp == NULL) { error("Could not open file for write\r\n"); } - fprintf(fp, "Hello my name is HEPTA\r\n"); + for(int i=0;i<10;i++) { + + + + } fclose(fp); - - pc.printf("Goodbye World!\r\n"); + fp = fopen("/sd/mydir/data.txt","r"); + for(int i=0;i<10;i++) { + + + } + fclose(fp); + pc.printf("Goodbye!\r\n"); } \ No newline at end of file