Skip to content

Library has the "ALT" I2C device address hard-coded. SDO needs to be 0v #26

@greiginsydney

Description

@greiginsydney

This library has the ADXL345's "ALT" I2C device address hard-coded.

From the ADXL345's data sheet (p17):

With the ALT ADDRESS pin high, the 7-bit I2C address for the device is 0x1D, followed by the R/W bit.
This translates to 0x3A for a write and 0x3B for a read.
An alternate I2C address of 0x53 (followed by the R/W bit) can be chosen by grounding the SDO/ALT ADDRESS pin (Pin 12).

and in src/SparkFun_ADXL345.cpp is:

#define ADXL345_DEVICE (0x53)    // Device Address for ADXL345

So if you're using the library as is and trying to talk I2C to it, make sure you ground the SDO pin.


- Greig.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions