mbed final
Dependencies: ADXL345_I2C BLE_API SDFileSystem mbed-rtos mbed nRF51822
Fork of 01 by
Diff: main.cpp
- Revision:
- 3:ca3f581d4a0b
- Parent:
- 2:e103492f1a0b
--- a/main.cpp Tue Jan 10 11:23:52 2017 +0000 +++ b/main.cpp Tue Jan 24 23:45:58 2017 +0000 @@ -5,14 +5,13 @@ #include "ble/services/DeviceInformationService.h" #include "rtos.h" #include "ADXL345_I2C.h" - #include <string.h> #include "SDFileSystem.h" #define N 100//addressを保存する個数 #define M 6//addressとtimeを入れる #define GET_TIME 10000 #define SEND_TIME 20000 -#define AD 0xAA +#define AD 0xEE DigitalOut myled3(LED3); Semaphore one_slot(1); @@ -24,8 +23,8 @@ int wt1=0;//central mode の時間 int ran; int countfp=0; -char id[] = "/sd/aaaaaaaaaaaa.csv"; -char acc[] = "/sd/aaaaaaaaaaaa_acc.csv"; +char id[] = "/sd/a.csv"; +char acc[] = "/sd/a_acc.csv"; //加速度センサー ADXL345_I2C accelerometer(p7, p30); @@ -89,7 +88,7 @@ wt=0;//central modeの際はthreadの時間は0sec wt1 = GET_TIME ;//centralmode の時間はこっち - fp(countfp == 0){ + if(countfp == 0){ fp = fopen( id , "w"); fclose(fp); kp = fopen( acc , "w");