This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ADXL345 with nrf52840

i want to interface the adxl345 accelerometer with the nrf52840 board 

i got an code from ADXL375_12C.zip

https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ADXL375_5F00_I2C.zip

 line 51:ret_code = nrf_drv_twi_rx(p_twi_master,slave_addr, pdata, bytes, false);

in adxl375 too many arguments to function 'nrf_drv_twi_rx'

why it comes when i execute the program in twi_sensor program

and how to change the code for adxl345

Parents Reply
  • well, if you want to just take that example and use it without modification, then you are obviously going to have to use whatever version that example assumes!

    However, the ADXL - like any other I2C slave - neither knows nor cares what SDK you use.

    The I2C slave doesn't even know what microcontroller you use - it just sees transactions on the I2C bus.

    So your job is to use the facilities of the SDK to generate those transactions.

Children
No Data
Related