#include <Wire.h>
#include <adxl345.h>


adxl345 adxl; //variable adxl is an instance of the ADXL345 library

void setup(){
  Serial.begin(9600);
  Wire.begin();
  adxl.powerOn();
}

int x,y,z;  

void loop(){

  adxl.readAccel(&x, &y, &z); //read the accelerometer values and store them in variables  x,y,z

    // Output x,y,z values - Commented out
  // 3.9 mg/LSB
  Serial.print(x*3.9);
  Serial.print("   ");
  Serial.print(y*3.9);
  Serial.print("   ");
  Serial.print(z*3.9);
  Serial.println(" mG");
}

