Thank you, @jremington for your feedback.
So just to be sure I'm not misunderstood, I did read the official documentation for ADXL345 sensor( Datasheet). And I quite understand how this sensor works and how can I "program" it for reading and generate interrupts(even though I can't make this part work).
I understand that, according to its documentation, I have to follow this steps:
-initialize it
-put it in 'Measurement mode'
-'setup its Range and DataRate(although not mandatory)
- set the coresponding Thresholds and axis to look for events and samples
- and the "trickier" part prepare it for generating interrupts;
According to data sheet:
Interrupts are enabled by setting the appropriate bit in the
INT_ENABLE register (Address 0x2E) and are mapped to
either the INT1 pin or the INT2 pin based on the contents of the
INT_MAP register (Address 0x2F). When initially configuring the
interrupt pins, it is recommended that the functions and interrupt
mapping be done before enabling the interrupts. When changing
the configuration of an interrupt, it is recommended that the
interrupt be disabled first, by clearing the bit corresponding to that
function in the INT_ENABLE register, and then the function be
reconfigured before enabling the interrupt again. Configuration
of the functions while the interrupts are disabled helps to prevent
the accidental generation of an interrupt before desired.
The interrupt functions are latched and cleared by either reading the
data registers (Address 0x32 to Address 0x37) until the interrupt
condition is no longer valid for the data-related interrupts or by
reading the INT_SOURCE register (Address 0x30) for the
remaining interrupts. This section describes the interrupts that
can be set in the INT_ENABLE register and monitored in the
INT_SOURCE register.
So, in my code I mapped the INT1 pin to interrupts generated by Activity(and Inactivity but lets keep it simple) and then I enabled it(but only the INT_ACTIVITY bit). After this I think I have to clear the registers before any measurements(by reading the INT_SOURCE reg and this is what adxl.getInterruptSource() does. Further, I dont get it why in the "sleep and wake" part, the interrupt never occurs. I have to confess that I worked before with interrupts from digital sensors and arduino but here I can't really tell what Im doing wrong. To be honest I'm not 100% sure that I have to attach the interrupt there (in the sleepNow() function) and detach it in the wakeNow() or if I have to clear the INT_SOURCE register at every iteration in loop().
Regarding that link you suggested, I also tried that "approach"...no good results. I also tried another sensor(to eliminate the possibility of a hardware problem).
Thank you in advance for any suggestions&help.