for_20211114
Dependencies: HEPTA_SENSOR mbed HEPTA_EPS HEPTA_COM HEPTA_CDH
main.cpp
- Committer:
- HeptaSatTraining2019
- Date:
- 2019-08-21
- Revision:
- 25:ccc5ff675e0c
- Parent:
- 24:3659e0c223c8
- Child:
- 26:220e5f95168a
File content as of revision 25:ccc5ff675e0c:
#include "mbed.h" #include "HEPTA_CDH.h" #include "HEPTA_EPS.h" Serial pc(USBTX,USBRX); int main() { pc.baud(9600); float bt; char str[100]; mkdir("/sd/mydir", 0777); FILE *fp = fopen("/sd/mydir/test.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/test.txt","r"); for(int j = 0; j < 10; j++) { } fclose(fp); pc.printf("Goodbye!!\r\n"); }