Configuring an ADXL345 accelerometer

Help! I have searched high and low online to no avail on how to configure an ADXL345 accelerometer beyond the basic configuration for reading the x, y, and z axes. Is there some place that has complete instructions on configuring an ADXL345?

To explain, I am wanting to configure the ADXL345 to be in auto sleep mode until it senses activity, the activity being when it is tilted along the x (or y) axis as I am only concerned about using one axis.

More specifically, I want it to trigger the interrupt int1 when it is tilted one direction (positive readings?) and trigger the interrupt int2 when it is tilted the opposite direction (negative readings?) along the same axis. When the x axis is parallel to gravity the adxl345 will be in sleep mode.

The ADXL345 data sheet is complete.

Yeah, I've tried reading the data sheet but it doesn't actually demonstrate what commands to use in IDE to configure the ADXL345. What I am looking for is something that shows what commands to use to configure for sleep mode, interrupts, etc.

The "commands" consist of register configuration data sent to the ADXL345 using I2C and the Wire library (or more rarely, using SPI). The ADXL345 data sheet tells you exactly what values to send for each possible device configuration.

There is no other resource.

If you have not already done so, find a tutorial with some example code, wire up the sensor, familiarize yourself with the purpose and meaning of each line of the example code, and learn to interpret the output produced by the sensor and the program.

After completing that exercise, come back with questions, posted as described in the "How to use this forum" entry.

Ok, guess it was wishful thinking on my part that there would be some instructions somewhere online that actually explains/teaches how to configure different aspects of an accelerometer. Thanks for the info.

Unfortunately, there are hundreds of different accelerometers, with little to no similarity in their configuration. New ones seem to come out every few months.