Page 1 of 1

LSM9DS1 9DOF gyro

Posted: Mon Aug 08, 2016 7:44 pm
by marfis
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/ ... at/main.py

Re: LSM9DS1 9DOF gyro

Posted: Tue Aug 09, 2016 9:32 am
by pythoncoder
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.

Re: LSM9DS1 9DOF gyro

Posted: Tue Aug 09, 2016 7:41 pm
by marfis
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 http://forum.micropython.org/viewtopic.php?f=5&t=1693)

Re: LSM9DS1 9DOF gyro

Posted: Wed Aug 10, 2016 6:30 am
by pythoncoder
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.

Re: LSM9DS1 9DOF gyro

Posted: Fri Mar 17, 2017 1:07 am
by HarryOz
Apologies for the noob question. Is this class usable on the micropython board attached to a LSM9DS1 sensor board?

Re: LSM9DS1 9DOF gyro

Posted: Sat Mar 18, 2017 4:25 pm
by marfis
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... ;) )