Well, The ADXL345 is the library I wrote myself. In the sketch all I do is take the values and print them in the monitor or my graph program made in processing.
All the problems would arise from the ADXL345 library, not the sketch.
A part of the problem is that when put in a tilt position the accelerometer, it gives me somewhere around(0,0,256) on (x,y,z axis).
And just to recap the second problem is that when I move the accelerometer into a position (after the setup function) it increments/decrements to a certain value on each axis.
This is some photos I took when I played with the graph.
Excuse my distortions from the graphic, but my accelerometer is quite.. ,,big" therefore, quite difficult to move.
Now, what we are interested in is just the accelerometer values, which are in the left column. The red line is the x axis, the white one is the y axis and the green one is the z axis.
You'll see when the line is straight, the accelerometer doesn't move on that axis, but standing.
And this is the sketch:
byte buff, single, multiple, freefall;