ADXL345 I2C no longer works

This is a sort of continuation of my topic http://arduino.cc/forum/index.php/topic,73257.0.html
So, a year ago successfully set up ADXL345 accelerometer with arduino, measured acceleration and stayed happy.
Now, took the same devices with same wires, uploaded the same sketch - and what do you think? Yes, it just hangs on Wire.endTransmission() line. =(
I was always following this tutorial: Live Fast - Code Young: ADXL345 accelerometer breakout board + Arduino and Processing
Wired everything just like on the picture by the link above.
I'm not asking why this happens, would be very grateful if someone told me how to test ADXL345 on operability.
Don't want to say that I've checked everything dozen of times, can send a picture of how everything is made up.
Here's a piece of code if it helps:

#include <Wire.h>

#define DEVICE (0x53)    //ADXL345 device address

void writeTo(int device, byte address, byte val)
{
  Serial.println("writing to device");
  //return;
 // Serial.flush();
  Wire.beginTransmission(device); //start transmission to device
  Serial.println("began transmission");
 // Serial.flush();
  Wire.write(address);        // send register address
  Serial.println("sent adress");
  Wire.write(val);        // send value to write
  Serial.println("sent value");
  byte ans = Wire.endTransmission(); //end transmission
  Serial.println((int)ans, DEC); // THIS IS NEVER PRINTED
  Serial.println("ended transmission"); // THIS IS NEVER PRINTED
  //Serial.flush();
  
}
void setup()
{
  Wire.begin();        // join i2c bus (address optional for master)
  Serial.begin(19200);  // start serial for output
  Serial.println("Started serial");
   
  //Turning on the ADXL345
  writeTo(DEVICE, 0x2D, 0);
  writeTo(DEVICE, 0x2D, 16);
  writeTo(DEVICE, 0x2D, 8);
  writeTo(DEVICE, 0x31, (1 << 3) | 1);

  Serial.println("Turned ADXL 345 on"); // THIS IS NEVER PRINTED
}

P.S. I'm almost in despair: it seems that devices will keep breaking down while I'm waiting for others to arrive from sparkfun (it takes a month+) :frowning:

Have you tried running an I2C scanner on the bus to see if the device is recognized? You can find one at Nick's site here Gammon Forum : Electronics : Microprocessors : I2C - Two-Wire Peripheral Interface - for Arduino

If you are talking about a sketch at the very end of the link you gave, I've just uploaded it to Arduino (though I have no idea how it is supposed to work) and yes, it just stucks (hangs) on Wire.endTransmission when i = 1. According to the source code in twi.c and some messages on the forum it is normal behaviour for the Wire library when there is nothing connected to address 1.
Or not?!
Have I missed something? Is it probably an Arduino that does not work as intended?..

Ixanezis:
If you are talking about a sketch at the very end of the link you gave, I've just uploaded it to Arduino (though I have no idea how it is supposed to work) and yes, it just stucks (hangs) on Wire.endTransmission when i = 1. According to the source code in twi.c and some messages on the forum it is normal behaviour for the Wire library when there is nothing connected to address 1.
Or not?!
Have I missed something? Is it probably an Arduino that does not work as intended?..

Yes that sketch and no if there is nothing connected to address 1 it should just skip past that address and continue checking the rest. Try removing the accelerometer from the Arduino and rerun the scanner sketch. It should come back and tell you that no devices were found. This way you kow your Arduino is OK. Then reconnect the device and try again. Make sure you're using Analog pins 4 (SDA) and 5 (SCL) for I2C and not D4 and D5. If it still doesn't work then your sensor may be defective.

Try removing the accelerometer from the Arduino and rerun the scanner sketch.

OK, did this. The code stucks with i = 1 on Wire.endTranmission, exactly as before.
So do you mean it is an Arduino that does not work as expected?

With nothing connected to the I2C lines you should get this as an output:

I2C scanner. Scanning ...
Done.
Found 0 device(s).