//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
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
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/69178/NRF51-DK-I2C-not-working/
so I need to adapt sensor library
https://developer.mbed.org/teams/Rohm/code/KX022/
with code from I2C scanner
https://developer.mbed.org/users/Cannonball2134/code/I2C_Scanner/