Hi everyone,
I recently purchased an Adafruit LSM6DS3TR-C + LIS3MDL - Precision 9 DoF IMU and connected it to my Raspberry Pi 3B+ using an RPI Proto board 03. After checking the connections using the "i2cdetect -y 1" command, I noticed that both the LSM6DS3TR-C and LIS3MDL modules were correctly detected.
However, when I try to read data from the accelerometer and gyro using the Python code I've written, using the Adafruit CircuitPython LSM6DS and Adafruit CircuitPython LIS3MDL libraries, I get results equal to zero. The magnetometer works correctly and returns results. Here's a sample output:
Accelerometer: ax = 0g, ay = 0g, az = 0g
Gyroscope: gx = 0dps, gy = 0dps, gz = 0dps
Magnetometer: mx = 0.135742gauss, my = 0.359009gauss, mz = 0.67041gauss
Accelerometer: ax = 0g, ay = 0g, az = 0g
Gyroscope: gx = 0dps, gy = 0dps, gz = 0dps
Magnetometer: mx = 0.13562gauss, my = 0.356445gauss, mz = 0.675781gauss
I also tried using C++ with the lbcm2835 library, but I received the same results.
Does anyone have any idea what might be causing this problem and how to solve it? Thanks in advance for your help.
Problem with reading data from Adafruit LSM6DS3TR-C + LIS3MDL IMU on Raspberry Pi
Moderators: adafruit_support_bill, adafruit
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
- WH173_P0NY
- Posts: 1
- Joined: Sun Apr 30, 2023 6:18 pm
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Problem with reading data from Adafruit LSM6DS3TR-C + LIS3MDL IMU on Raspberry Pi
Do you have a microcontroller you could use for comparison testing? It would be useful to see if you get the same behavior.
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/