LSM9DS1 9DOF gyro

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
User avatar
marfis
Posts: 136
Joined: Fri Oct 31, 2014 10:29 am
Location: Zurich / Switzerland

LSM9DS1 9DOF gyro

Postby marfis » Mon Aug 08, 2016 7:44 pm

used on the Raspberry Foundation's SenseHat board, it's a 9DOF gyro/accel/magnetometer chip from ST Micro
https://github.com/hoihu/projects/blob/ ... lsm9ds1.py

the implementation does not fully support all the feature in order to maintain the memory footprint reasonably low. I've used this driver together with a fusion algorithm here: https://github.com/hoihu/projects/blob/master/raspi-hat/main.py

User avatar
pythoncoder
Posts: 1564
Joined: Fri Jul 18, 2014 8:01 am

Re: LSM9DS1 9DOF gyro

Postby pythoncoder » Tue Aug 09, 2016 9:32 am

That looks very useful.

If I could make a suggestion: if I use a module written by another developer I post a link to the source (either in a README or as a code comment). This enables users to check for and install any updates. I'm thinking of the fusion module here which, aside from any bugfixes which might occur, will need updating as pyb is replaced by machine.
Peter Hinch

User avatar
marfis
Posts: 136
Joined: Fri Oct 31, 2014 10:29 am
Location: Zurich / Switzerland

Re: LSM9DS1 9DOF gyro

Postby marfis » Tue Aug 09, 2016 7:41 pm

Yeah you are right, I'll add a link. Thanks for pointing that out.

Btw your fusion algo implementation works great. Helped me a lot. Certainly didn't want to credit myself for this, just to make that clear...(as pointed out already in viewtopic.php?f=5&t=1693)

User avatar
pythoncoder
Posts: 1564
Joined: Fri Jul 18, 2014 8:01 am

Re: LSM9DS1 9DOF gyro

Postby pythoncoder » Wed Aug 10, 2016 6:30 am

No problem - I'm not bothered about credit. I just want to ensure users know where to get forthcoming changes. I plan to make my libraries more portable now MicroPython has been ported to boards other than the Pyboard. Further, the long term aim of the developers is to replace the pyb library with more portable libs e.g. machine.
Peter Hinch

HarryOz
Posts: 9
Joined: Thu May 19, 2016 6:02 am

Re: LSM9DS1 9DOF gyro

Postby HarryOz » Fri Mar 17, 2017 1:07 am

Apologies for the noob question. Is this class usable on the micropython board attached to a LSM9DS1 sensor board?

User avatar
marfis
Posts: 136
Joined: Fri Oct 31, 2014 10:29 am
Location: Zurich / Switzerland

Re: LSM9DS1 9DOF gyro

Postby marfis » Sat Mar 18, 2017 4:25 pm

In principle any uPy board with i2c support should work. I tested the code with the pyboard.

If you use the SenseHAT board there is documentation on how to wire up things here:
https://github.com/hoihu/projects/tree/master/raspi-hat

I couldn't test the latest version of the driver (move to the machine API) because I dont't have access to a working SenseHAT board (yes I managed to kill it... ;) )


Return to “Drivers for External Components”

Who is online

Users browsing this forum: No registered users and 2 guests