Skip to main content
Visitor II
July 8, 2020
Question

How ACC reading with i2c communication?

  • July 8, 2020
  • 3 replies
  • 995 views

Hi,

I am using STM32F407 DİSCOVERY. I am trying to internal accelerometer(LIS3DSH) reading with I2C communication because my teacher asked for this but everyone ACC reading with SPI communication. I wonder if it is not read with ACC (LIS3DSH) I2C or am I dealing with something wrong? Why everyone is using SPI communication While reading ACC ?

    This topic has been closed for replies.

    3 replies

    Super User
    July 9, 2020

    If you look at the LIS3DSH datasheet, you'll see it supports both SPI and I2C communication. This is common on many different sensors.

    RESEN.1Author
    Visitor II
    July 9, 2020

    Thak you TDK,

    so Why is everyone using SPI communication to read ACC?

    Regards

    Super User
    July 9, 2020

    > Why is everyone using SPI communication to read ACC?

    They aren't.

    The very first hit in google for "LIS3DSH i2c library" is this:

    https://github.com/electricimp/LIS3DH

    Which proves a nonzero number of people are using I2C.

    This took me 10 seconds to find.