problem interfacing accelerometer sensor

hello friends i am working on a project gesture controlled robot

but the reference i took to do the project works with ADXL335
but i own a ADXL345

can i replace and work with ADXL345

how to do it?

what changes should i do?

ADXL335 &ADXL345 Have different pins so i am confused

The ADXL345 has a digital interface wheras the ADXL335 has analogue outputs.

Follow the links from this page, especially to the Quick Start Guide:

Note it must be powered by about 3.3 volts, not 5 volts.

It is certainly not advisable to connect the ADXL345 to a 5 volt Arduino as shown in the Quick Start Guide. The Arduino will be applying 5 volt digital signals to the accelerometer. You should use a level shifter (or use I²C and follow this guidance). Here is an example level shifter:
https://www.sparkfun.com/products/12009.

I would just buy a ADXL335 which does not need a level shifter (but will give less resolution).