mbed final
Dependencies: ADXL345_I2C BLE_API SDFileSystem mbed-rtos mbed nRF51822
Fork of 01 by
Revision 3:ca3f581d4a0b, committed 2017-01-24
- Comitter:
- kataokashunpei
- Date:
- Tue Jan 24 23:45:58 2017 +0000
- Parent:
- 2:e103492f1a0b
- Commit message:
- push final
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| nRF51822.lib | Show annotated file Show diff for this revision Revisions of this file |
--- 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");
--- a/nRF51822.lib Tue Jan 10 11:23:52 2017 +0000 +++ b/nRF51822.lib Tue Jan 24 23:45:58 2017 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/nakamae/code/nRF51822/#fdeb2820ef26 +https://developer.mbed.org/users/kataokashunpei/code/nRF51822/#819c58e5bd42
