Hi I'm a newbie with BBB.
I'm trying to use LSM9DSO 9-DOF IMU with BBB via I2C.
I've tried the i2cdetect and i2c = Adafruit_I2C(0x77) command from this guide: https://cdn-learn.adafruit.com/download ... -black.pdf. but both resulted in errors.
I have also found a library for LSM9DSO(https://github.com/projectzen/Beaglebone-LSM9DS0), but I have no idea how to use it.
I really appreciate any advice.
It's my first time here, so I apologize if anything in this post is inappropriate.
LSM9DS0 with BBB
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- drewfustini
- Posts: 944
- Joined: Sat Dec 26, 2015 1:19 pm
Re: LSM9DS0 with BBB
Please paste the exact error here or attach a screenshot.I've tried the i2cdetect and i2c = Adafruit_I2C(0x77) command from this guide. but both resulted in errors.
- van17061
- Posts: 3
- Joined: Mon Nov 07, 2016 12:53 am
Re: LSM9DS0 with BBB
Here are the error messages
I made some mistake for i2cdetect, now I can probe i2c2. the results are as follow>>> from Adafruit_I2C import Adafruit_I2C
>>> i2c = Adafruit_I2C(0x77)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/Adafruit_I2C.py", line 17, in __init__
self.bus = smbus.SMBus(busnum if busnum >= 0 else 1)
IOError: [Errno 2] No such file or directory
Really appreciate your attention :)ubuntu@ubuntu-armhf:~$ sudo i2cdetect -r -y 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- 1d -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- 6b -- -- -- --
70: -- -- -- -- -- -- -- --
- drewfustini
- Posts: 944
- Joined: Sat Dec 26, 2015 1:19 pm
Re: LSM9DS0 with BBB
Is this the sensor that you have?
Adafruit 9-DOF Accel/Mag/Gyro+Temp Breakout Board - LSM9DS0
PRODUCT ID: 2021
It is important to determine what the I2C addresses are for that sensor. From the Arduino library for the breakout board:
Adafruit_LSM9DS0_Library/blob/master/Adafruit_LSM9DS0.h
You'll need to use the argument of 0x1D or 0x6B for Adafruit_I2C().
Adafruit 9-DOF Accel/Mag/Gyro+Temp Breakout Board - LSM9DS0
PRODUCT ID: 2021
It is important to determine what the I2C addresses are for that sensor. From the Arduino library for the breakout board:
Adafruit_LSM9DS0_Library/blob/master/Adafruit_LSM9DS0.h
It does appear that the sensor is wired to your BeagleBone correctly based on the output of sudo i2cdetect -r -y 2.#define LSM9DS0_ADDRESS_ACCELMAG (0x1D) // 3B >> 1 = 7bit default
#define LSM9DS0_ADDRESS_GYRO (0x6B) // D6 >> 1 = 7bit default
You'll need to use the argument of 0x1D or 0x6B for Adafruit_I2C().
- van17061
- Posts: 3
- Joined: Mon Nov 07, 2016 12:53 am
Re: LSM9DS0 with BBB
Yes, I exactly have the sensor you mentioned.
Thank you so much drewfustini, I will try using the address !
Thank you so much drewfustini, I will try using the address !
Please be positive and constructive with your questions and comments.