LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ADXL345 with Labview and Arduino using SPI protocol

Hello, 

 

I am trying to get x,y,z axis data from the accelerometer adxl345 using linx in labview. I have managed to do that with I2C protocol, but I want to do it also with SPI protocol in order to achieve greater sampling rate. I have read the adxl345 datasheet but I struggle figuring out to which registers I must write so that I can read the datax,y,z registers. 

I attach my program below, thank you in advance.

0 Kudos
Message 1 of 4
(2,760 Views)

Have you contacted the accelerometer manufacturer to see if they have specs on the registers? If not, here's a user guide to that accelerometer that might help: http://www.analog.com/en/products/adxl345.html#product-overview

 

 

Is this device compatible with both I2C and SPI?

Christine B
Technical Support Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,720 Views)

Hello and thanks for your reply

 

The adxl345 connects both with spi and i2c. I have read the data sheet but I can’t quite figure out to which exact registers must I write and what in order to read the correct values from registers 32-37 (hex) where the x,y and z axis data are.

0 Kudos
Message 3 of 4
(2,713 Views)

did you manage to make it work?

0 Kudos
Message 4 of 4
(1,140 Views)