03-05-2018 09:19 AM
Hello folks,
I needed some help in regards with interfacing adxl345 with myrio and reading data from it via i2c. So far, i have connected the pins as provided in the picture, but i'm confused about the SDA, SCL connections to D in/out and D Out pins of processor
confused whether DIO and D Out are pins 34,32 (SDA,SCL) or someother pinson myrio.
As of now i have assumed them to be pins34,32 and tried the below two VI's. The first VI is provided in project essentials guide which is for digilent PMOD accelerometer which itself is powered by adxl345 ,this VI work perfectly fine for PMOD acl but not for adxl345 giving a 363011 error which is a NACK error. and the second one is a simple read VI that i found in the forum which gives the same error
03-06-2018 03:27 PM
Hey lonewolf!
I took a look at the second piece of code--are you bringing the device out of standby mode as is mentioned in the other thread? It looks like the second piece of code you've attached is the first iteration of code in that thread.
As far as the SDA and SCL, yes, those are pins 34 and 32. Are you using pull up resistors? What resistor value are you using?