-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add driver for LSM6DS3 6-Axis Accelerometer&Gyroscope #17053
Comments
hey, I got it talking in test/driver_lsm6dsl by setting LSM6DSL_WHO_AM_I = 0x69. if you're just looking to test. I'm using an arduino-nano-33-iot. will work on a more proper implementation later today. Edit: what's the proper way to implement super similar drivers? should i just copy everything from the lsm6dsl and make a bunch of changes or should i try to use includes to re-use lsm6dsl code? Edit2: also I had to set the address... 0x6A |
@donsez support is here working with saul, test code, and arduino-nano-33-iot. Still has some features from LSM6DSL that I need to cull though. |
If the sensors are so similar that they can be handled with one driver and little specific code, the correct way is to use a common driver. The driver and all identifiers are named with I am a bit confused, according to the datasheets both LSM6DSL and LSM6DS3 use That you had to change the I2C address is clear. Both sensors allow |
@gschorcht thx, I’ll take a look at l3gxxxx or ina2xx.
If I pull the datasheet from Arduino (I’m testing on a nano 33 iot), their site has 0x69. But if I look at their library, they have
where 0 is a failure. Not sure if 0=failure is an Arduino thing, but you can take a look at their example:
Any idea why they allow 0x6C or 0x69? In my industry (automation), a little company like Arduino could get custom versions from suppliers, but I would doubt it in silicon. |
This is really strange. If I pull the datasheet from Digikey I also the 0x69 as ID. But if I search on the ST web site, the only active product is the LSM6DS3TR-C for which the ID is definitely 0x6a. The SparkFun Library also checks for 0x69 as ID. But why the hell did they change the ID for a newer revision of the same sensor 🤔 I guess the driver should just check for all possible IDs for this sensor. BTW, the LSM6DS3 is declared as obsolete at DigiKey and can't be ordered anymore when it becomes out of stock.
The ID of the LSM6DSOX is 0x6c. It's probably just another variant and the driver also works with this variant. |
Sounds like I've got some reading to do. Maybe I'll pick up a shield version of an LSM that's still made. |
Description
Add driver for ST LSM6DS3 6-Axis Accelerometer&Gyroscope
This device is popular and available as a Grove module. Its I2C address is
0x6A
.Useful links
LSM6DSL is probably very similar to the LSM6DS3.
The driver LSM6DSL is already implemented by RIOT (drivers/lsm6dsl). Its I2C address is
0x6B
.The text was updated successfully, but these errors were encountered: