2023-10-25 05:14 AM
I have some following up questions after my last post: https://community.st.com/t5/stm32-mcus-products/lsm303dlhc-c/m-p/597950#M224881. I now have a code that does not give any errors. with the librarys in the picture below. But when i run the code and call for: BSP_accelero_init(); it returns a 1, this means that the sensor is not found. according to the library the I2C adresses are 32 and 3C, but when i do a I2C scanner on my arduino it says this should be 18 and 1E. After trying those adresses it still does not work. Could enyone help me with this?
Solved! Go to Solution.
2023-11-02 03:30 AM
I found out my school gave us chinees fake of the sensor. So we are not using it anymore. But thanks for your help!
2023-10-25 07:01 AM
Hello @Chris_student ,
The I2C addresses (0x32 and 0x3C) are correct. (from datasheet 5.1.1 section https://www.st.com/resource/en/datasheet/lsm303dlhc.pdf )
You can connect an oscilloscope and check SDA and SCL behavior.
Foued
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-11-02 03:30 AM
I found out my school gave us chinees fake of the sensor. So we are not using it anymore. But thanks for your help!