Rodrigo Miguez / Mbed 2 deprecated i2c_acelerometro

Dependencies:   BLE_API mbed nRF51822 circular_buffer

Files at this revision

API Documentation at this revision

Comitter:
agufal
Date:
Wed May 25 13:35:41 2016 +0000
Parent:
12:172acb80fcab
Commit message:
implementado bucle principal con un sleep

Changed in this revision

AccelService.cpp Show annotated file Show diff for this revision Revisions of this file
AccelService.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/AccelService.cpp	Mon May 23 13:48:29 2016 +0000
+++ b/AccelService.cpp	Wed May 25 13:35:41 2016 +0000
@@ -1,7 +1,7 @@
 #include "AccelService.h"
 
-AccelService::AccelService() : _accelState( CHARACTERISTIC_UUID, _values, 6, 6, 
-                                            GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ/*NOTIFY*/ )
+AccelService::AccelService() : 
+    _accelState( CHARACTERISTIC_UUID, _values, 6, 6, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ)
 {
     
     const static char     DEVICE_NAME[] = "AccelBike";
--- a/AccelService.h	Mon May 23 13:48:29 2016 +0000
+++ b/AccelService.h	Wed May 25 13:35:41 2016 +0000
@@ -6,6 +6,7 @@
 
 #define SERVICE_UUID 0xA000
 #define CHARACTERISTIC_UUID 0xA001
+#define CALIBRATION_UUID 0xA002
 
 class AccelService {
     
@@ -27,7 +28,7 @@
     
         BLE::Instance().gap().stopAdvertising();
         
-    }
+    }  
 };
 
 #endif //#ifndef ACCELSERVICE_H
\ No newline at end of file
--- a/main.cpp	Mon May 23 13:48:29 2016 +0000
+++ b/main.cpp	Wed May 25 13:35:41 2016 +0000
@@ -45,7 +45,7 @@
    
     while(1) {
         
-        Vector ultimo = acc.leer();
+        Vector ultimo = acc.leer();       
         buffer.push_back(ultimo);
         
         // TODO Hacer esto en un hilo