Battery and SDcard Q
Dependencies: mbed PowerControl SDFileSystem
Fork of HeptaBattery_SDFilesystem_Q by
main.cpp
- Committer:
- tomoya123
- Date:
- 2016-12-09
- Revision:
- 0:9eb94b338772
- Child:
- 1:6d9166677466
File content as of revision 0:9eb94b338772:
#include "mbed.h" #include "SDFileSystem.h" #include "HeptaBattery.h" Serial pc(USBTX,USBRX); //ピンアサイン読み込み、オブジェクトの生成 int main() { pc.baud(9600); float bt; pc.printf("Hello world!\r\n"); mkdir("/sd/mydir", 0777); printf("helloworld\r\n"); FILE *fp = fopen("/sd/mydir/sdtest.txt","w"); if(fp == NULL) { error("Could not open file for write\r\n"); } for(int i=0;i<10;i++){ //メンバー関数の使用 } fclose(fp); printf("Goodbye!!\r\n"); }