ADXL345 DIGITAL CODE ERROR

Hi

I a getting error in the code to read the adxl x,y,z data

// Arduino code and library is available to download - link below the video.
 
/* Accelerometer connection pins (I2C) to Arduino are shown below:

Arduino     Accelerometer ADXL345
  A5            SCL
  A4            SDA
  3.3V          CS
  3.3V          VCC
  GND           GND
*/ 

#include <Wire.h>
#include <ADXL345.h>


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

int x,y,z;  
int rawX, rawY, rawZ;
float X, Y, Z;
float rollrad, pitchrad;
float rolldeg, pitchdeg;

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

void loop(){
  adxl.readAccel(&x, &y, &z);  //read the accelerometer values and store them in variables  x,y,z
  // Output (x,y,z) on horizontal plane should be approximately (0,0,255) 
  // the following 3 lines is for an offset
  rawX=x-7;
  rawY=y-6;
  rawZ=z+10;
   
  X = rawX/256.00; // used for angle calculations
  Y = rawY/256.00; // used for angle calculations
  Z = rawZ/256.00; // used for angle calculations
   
  rollrad = atan(Y/sqrt(X*X+Z*Z));  // calculated angle in radians
  pitchrad = atan(X/sqrt(Y*Y+Z*Z)); // calculated angle in radians
  
  rolldeg = 180*(atan(Y/sqrt(X*X+Z*Z)))/PI; // calculated angle in degrees
  pitchdeg = 180*(atan(X/sqrt(Y*Y+Z*Z)))/PI; // calculated angle in degrees
  // print out values:
  /*
  Serial.print("x: "); Serial.print(x);    // raw data without offset
  Serial.print(" y: "); Serial.print(y);     // raw data without offset
  Serial.print(" z: "); Serial.print(z);     // raw data without offset
  Serial.print(" rawX = "); Serial.print(rawX); // raw data with offset
  Serial.print(" rawY = "); Serial.print(rawY); // raw data with offset
  Serial.print(" rawZ = "); Serial.print(rawZ); // raw data with offset
  Serial.print(" X = "); Serial.print(X);    // raw data with offset and divided by 256
  Serial.print(" Y = "); Serial.print(Y);    // raw data with offset and divided by 256
  Serial.print(" Z = "); Serial.print(Z);    // raw data with offset and divided by 256
 */
  Serial.print("\t Angle according to x axis (Roll(deg)) = "); Serial.print(rolldeg);      // calculated angle in degrees
  Serial.print("\t Angle according to y axis (Pitch(deg)) = "); Serial.println(pitchdeg);  // calculated angle in degrees
  // Serial.print(" Roll(rad) = "); Serial.print(rollrad);   // calculated angle in radians
  // Serial.print(" Pitch(rad) = "); Serial.print(pitchrad); // calculated angle in radians
}

i have copied the code fro following link.
http://www.himix.lt/arduino/arduino-and-digital-accelerometer-adxl345-i2c/

And do we have to guess what the error is?

no matching function for call to 'ADXL345::readAccel(int*, int*, int*)'

I don’t have the file “ADXL345.h”, but if you open it, you will (hopefully) find the correct prototype for the function “readAccel”

AWOL:
I don't have the file "ADXL345.h", but if you open it, you will (hopefully) find the correct prototype for the function "readAccel"

where can i find correct prototype

In the file ADXL345.h

Sorry i a not understanding how to do. can you please explain me in details

Find the file ADXL345.h on your PC. Start looking in your libraries directory.

Open the file ADXL345.h in a suitable text editor.

Search for the text string "readAccel"

The error message will even tell you what the function signature(s) are. It will also tell you the location of ADXL345.h. You need to scroll the black console window at the bottom of the Arduino IDE window up to see the full error output.