You are reading a single comment by @user67183 and its replies. Click here to read the full conversation.
  • Yes, my pinout is the same.

    Did you able to get accelerometer working?

    I have readed I2C pins (put them as input)

    //P0_16 SCL -- default HIGH probably pullup
    //P0_15 SDO/ADR -- default HIGH probably pullup
    //P0_14 SDI/SDA -- default HIGH probably pullup
    //P0_13 Trigger -- default LOW
    //P0_12 INT1 -- default LOW
    //P0_11 INT2 -- default HIGH probably pullup
    //P0_10 nCS -- default HIGH probably pullup -- from datasheet is this pin is high I2C is enabled so this is ok
    // The Slave Address associated with the KX022 is 0011111X,
    // where the programmable bit, X, is determined by the assignment of ADDR (pin 1) to GND or IO_Vdd.
    // So in this case we have adress 0011111
    // 1Fh 3Fh 00111111

    then I put I2C scaner code and found accelerometer at that address

    I2C device found at address 31 0x1F 0

    in mbed there is some problem with I2C library
    https://developer.mbed.org/questions/691­78/NRF51-DK-I2C-not-working/
    so I need to adapt sensor library
    https://developer.mbed.org/teams/Rohm/co­de/KX022/
    with code from I2C scanner
    https://developer.mbed.org/users/Cannonb­all2134/code/I2C_Scanner/

About

Avatar for user67183 @user67183 started