This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

[nRF52805] ble app uart + I2C + LIS3DH Acc Output X,Y,Z values from LIS3DH 0!!!

  

values returned by ACC is always 0  !!

shema hardware LIS3DH :

shema hardware NRF52805 && LIS3DH :

twi initi:

#define PIN_SCL             NRF_GPIO_PIN_MAP(0, 16) // SCL signal pin
#define PIN_SDA             NRF_GPIO_PIN_MAP(0, 18) // SDA signal pin

I was based on this link NRF52840:

iamjustinwang.blogspot.com/.../nrf52840-ble-app-uart-i2c-lis3dh-acc.html

Please help me to fix this. Also, If you think any other approach is simple and efficient, please let me know. Im open to suggestions. 

Parents
  • Hi

    Is the device running as intended in the other regards than the TWI returning invalid/wrong values? What SoftDevice are you using in this application?

    Seeing as the values are all 0, do you move the device at all? I would imagine an accelerometer would only output values other than 0 if in motion. Are you able to confirm which line is printing these values exactly? I didn't spot what could be wrong at the first glance at your code I'm afraid.

    Best regards,

    SImon

Reply
  • Hi

    Is the device running as intended in the other regards than the TWI returning invalid/wrong values? What SoftDevice are you using in this application?

    Seeing as the values are all 0, do you move the device at all? I would imagine an accelerometer would only output values other than 0 if in motion. Are you able to confirm which line is printing these values exactly? I didn't spot what could be wrong at the first glance at your code I'm afraid.

    Best regards,

    SImon

Children
No Data
Related