this is program how build nRF51822 to get ADXL345 data

Dependencies:   BLE_API mbed nRF51822

Fork of ADXL345_I2C by Peter Swanson

Revision:
7:31412349a322
Parent:
6:bc835d0f686f
Child:
8:a682144e97a8
--- a/main.cpp	Wed Dec 06 03:10:08 2017 +0000
+++ b/main.cpp	Wed Dec 06 04:42:53 2017 +0000
@@ -51,8 +51,7 @@
 {
     led1 = !led1;
 }
-
-int readings[3] = {0, 0, 0};
+/*
 int threshold =80;
 int xval[100]={0};
 int yval[100]={0};
@@ -96,13 +95,13 @@
    uart1.printf("%i\n", (int16_t)zavg); //nilai hasil kalibrasi z
    led1=0;     
 }
-
+*/
 
  int main() 
  {
      uart1.baud(9600);
      int readings[3] = {0, 0, 0};
-     calibrate();
+     //calibrate();
      uart1.printf("Starting ADXL345 test...\n");
      wait(.001);
      uart1.printf("Device ID is: 0x%02x\n", accelerometer.getDeviceID());
@@ -121,6 +120,7 @@
     //Measurement mode.
     accelerometer.setPowerControl(0x08);
     
+    /*
         int acc=0;
         int totvect   [100] = {0};
         int totave    [100] = {0};
@@ -188,7 +188,7 @@
              
     
         }
-         
+       */  
          
     led1 = 1;
     uart1.baud(9600);