Lizzy project

Dependencies:   aconno_I2C Lis2dh12 adc52832_common aconno_SEGGER_RTT

Files at this revision

API Documentation at this revision

Comitter:
dbartolovic
Date:
Wed Mar 07 14:39:27 2018 +0000
Parent:
0:fc77522f4d28
Child:
2:41a1cdac47a7
Child:
3:38eadab20283
Commit message:
Made some adjustments.

Changed in this revision

aconno_ble/aconno_ble.h Show annotated file Show diff for this revision Revisions of this file
source/main.cpp Show annotated file Show diff for this revision Revisions of this file
source/main.h Show annotated file Show diff for this revision Revisions of this file
--- a/aconno_ble/aconno_ble.h	Wed Mar 07 13:40:28 2018 +0000
+++ b/aconno_ble/aconno_ble.h	Wed Mar 07 14:39:27 2018 +0000
@@ -13,7 +13,7 @@
 
 #define MSD_SIZE_b          (10)
 #define ADV_INTERVAL_MS     (100)
-#define APPLICATION_ID      (0xFFFF0059) //(0xCF170059)
+#define APPLICATION_ID      (0xCF170059) //(0xCF170059)
 
 /* Global variables and constants */
 
--- a/source/main.cpp	Wed Mar 07 13:40:28 2018 +0000
+++ b/source/main.cpp	Wed Mar 07 14:39:27 2018 +0000
@@ -41,12 +41,16 @@
         advertisementPacket.magnetometer[1] = (int16_t)0;
         advertisementPacket.magnetometer[2] = (int16_t)0;
         
-        /*
-        advertisementPacket.accelerometer[0] = (int16_t)mems.readXAxis()*LSB_VALUE;
-        advertisementPacket.accelerometer[1] = (int16_t)mems.readYAxis()*LSB_VALUE;
-        advertisementPacket.accelerometer[2] = (int16_t)mems.readZAxis()*LSB_VALUE;    
-        */
-        //advertisementPacket.accelerometer[2] = 0x2323;
+        
+        advertisementPacket.accelerometer[0] = (int16_t)mems.readXAxis()*LSB_VALUE/375;
+        advertisementPacket.accelerometer[1] = (int16_t)mems.readYAxis()*LSB_VALUE/375;
+        advertisementPacket.accelerometer[2] = (int16_t)mems.readZAxis()*LSB_VALUE/375;
+        
+        
+        printf("%d\t", advertisementPacket.accelerometer[0]);
+        printf("%d\t", advertisementPacket.accelerometer[1]);
+        printf("%d\r\n", advertisementPacket.accelerometer[2]);
+
         //updatePayload(ble, &advertisementPacket);
         
         /* setup advertising */
@@ -78,7 +82,7 @@
         #if DEBUG_LED
             redLed = 1;
         #endif
-        ble->gap().stopAdvertising();
+        //ble->gap().stopAdvertising();
         /*
         GapAdvertisingData advetisementData = GapAdvertisingData();
         advetisementData = ble->getAdvertisingData();
--- a/source/main.h	Wed Mar 07 13:40:28 2018 +0000
+++ b/source/main.h	Wed Mar 07 14:39:27 2018 +0000
@@ -15,7 +15,7 @@
 #include "GapAdvertisingData.h"
 
 #define DEBUG               (0)
-#define PRINT_ON_RTT        (0)
+#define PRINT_ON_RTT        (1)
 #define DEBUG_LED           (1)
 #define NANO_MODULE         (0)
 #define LSB_VALUE           (192)