0

Calibration LMS3MDL with Raspberry Pi using Blinka
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Calibration LMS3MDL with Raspberry Pi using Blinka

by bsautner on Thu Jun 30, 2022 6:39 am

I have a LMS3MDL on a Rasp Pi 4 and I'm trying to calibrate it. The headings I get from it are really inconsistent.

I am able to connect to it with python and get readings though. I'm doing this tutorial:

https://learn.adafruit.com/adafruit-sen ... ing-blinka

The python example gives an error when I run it:


Code: Select all | TOGGLE FULL SIZE
Traceback (most recent call last):
  File "/home/ben/9dof_calibration.py", line 9, in <module>
    from adafruit_lsm6ds import LSM6DSOX
ImportError: cannot import name 'LSM6DSOX' from 'adafruit_lsm6ds' (/home/ben/.local/lib/python3.9/site-packages/adafruit_lsm6ds/__init__.py)


I installed everything so i'm wondering if the tutorial is out of date or i'm missing something

Thanks

Ben

bsautner
 
Posts: 12
Joined: Tue Jul 19, 2016 3:04 pm

Re: Calibration LMS3MDL with Raspberry Pi using Blinka

by adafruit_support_carter on Thu Jun 30, 2022 2:41 pm

I think that guide page was written prior to a major refactor in the library layout. So the import syntax shown in the Learn guide needs to be updated.

Try changing the import line from:
Code: Select all | TOGGLE FULL SIZE
from adafruit_lsm6ds import LSM6DSOX

to:
Code: Select all | TOGGLE FULL SIZE
from adafruit_lsm6ds.lsm6dsox import LSM6DSOX

adafruit_support_carter
 
Posts: 24080
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.