Calibration LMS3MDL with Raspberry Pi using Blinka

Play with it!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Post Reply
User avatar
bsautner
 
Posts: 12
Joined: Tue Jul 19, 2016 3:04 pm

Calibration LMS3MDL with Raspberry Pi using Blinka

Post by bsautner »

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

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

User avatar
adafruit_support_carter
 
Posts: 24115
Joined: Tue Nov 29, 2016 2:45 pm

Re: Calibration LMS3MDL with Raspberry Pi using Blinka

Post by adafruit_support_carter »

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

from adafruit_lsm6ds import LSM6DSOX
to:

Code: Select all

from adafruit_lsm6ds.lsm6dsox import LSM6DSOX

Post Reply
Please be positive and constructive with your questions and comments.

Return to “Circuit Playground and Circuit Playground Express”