//Arduino 1.0+ Only!
//Arduino 1.0+ Only!

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


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

void setup(){
  Serial.begin(9600);
  adxl.powerOn();
  adxl.setFullResBit(true);
  adxl.setRangeSetting(16);
  
}

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.println(z*3.9);
 
  }
