cltp(仮), 日本語があるので修正必要。
Dependencies: mbed HEPTA_CDH_lite LPS25HB_I2C
main.cpp
- Committer:
- heptasat2021
- Date:
- 2021-08-20
- Revision:
- 2:e181e5c64233
- Parent:
- 1:ddac5ec89167
- Child:
- 3:f64ab3adcac5
File content as of revision 2:e181e5c64233:
#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() { float btvol; char str[100]; mkdir("/sd/mydir", 0777); FILE *fp = fopen("/sd/mydir/data.txt", "w"); if(fp == NULL) { error("Could not open file for write\r\n"); } for(int i=0;i<10;i++) { } fclose(fp); fp = fopen("/sd/mydir/data.txt","r"); for(int i=0;i<10;i++) { } fclose(fp); pc.printf("Goodbye!\r\n"); }