LIS2HH12TR Accelerometer , getting 0,0,0 using I2c , address 0x1E

hi, team

I'm trying ST accelerometer LIS2HH12TR coding with no luck, its connected on PCB using i2c.

on i2c scanner i'm getting 0x1E as address, as you can see in serial monitor
Screenshot 2023-06-11 at 18.44.21

But i tried lot libraries of same,

&

but no luck, i'm not able to get values,

Can someone please hint me, how i can start debugging, I tried to read datasheet but couldn't get any such info of this address register
.
Here is application note of accelerometer : https://www.st.com/resource/en/application_note/an4662-lis2hh12-mems-digital-output-motion-sensor-ultralowpower-highperformance-3axis-pico-accelerometer-stmicroelectronics.pdf

Welcome to the forum.

You are going to fast, let's make small steps.
First the hardware:

Is the sensor running at 3.3V ?
Which Arduino board do you use ? I hope it is a 3.3V board, so the voltage levels on the I2C bus match.
Are there pullup resistors ?

Next is running a I2C Scanner. You did that already, but the 0x1E could also be something that is soldered on the Arduino board. Did you run the I2C Scanner with the sensor not connected ?

Next is reading the "WHO_AM_I" register from the sensor, using the Wire library.
Let's skip this step, because the next step is more fun.

Next is using a library and reading how that library should be used.
The rhio-LIS2HH12 uses I2C address 0x1D.
You can fix that by setting the right I2C address before lis.begin():

lis.setI2C(0x1E);
lis.begin(); 

I think that the Tinee9 library uses the SPI bus.

Yes, sir,

its 3.3, connected with I2c pins of Esp32, also pull-up resistors .

i'm sure, as i've more pcb, without accelerometer, its doesn't get any such address in i2c scan.

&

Finally

Thanks, i got it working , only initialisation i2c address was the main concern. that you told, after i use .setI2c(0x1E), it got worked.

thanks again.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.