Skip to main content
Visitor II
February 7, 2024
Question

Error in Reading temperature using Lis3dh

  • February 7, 2024
  • 1 reply
  • 1103 views

 

Hi everyone,

 

I have an STM32L4 series-based board with an embedded LIS3DH sensor. I've written code to read temperature values from it, configuring all settings as per the datasheet. However, I'm having trouble obtaining the exact temperature value from the ADC3_L registers. Below I attach the code also:

1. I am enabling the temp sensor and after I am using LIS_read_ADC function to get the value stored on it.

 

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    February 9, 2024

    Hi @AKH ,

    Welcome to ST Community!

    I suggest you to look at our PID examples on Github where you can find how to get the temperature output.

    Let me know if this helps you.