Skip to content

SPI support? #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pslade2 opened this issue Jun 1, 2020 · 11 comments
Open

SPI support? #17

pslade2 opened this issue Jun 1, 2020 · 11 comments
Labels
enhancement New feature or request

Comments

@pslade2
Copy link

pslade2 commented Jun 1, 2020

I saw that there is an Arduino SPI library for this device. Are there plans to support SPI for this sensor in python as well?

@ladyada
Copy link
Member

ladyada commented Jun 1, 2020

we haven't gotten to it, but if you'd like to help we'd love a hand :)

@evaherrada evaherrada added the enhancement New feature or request label Jun 30, 2020
@sakethramanujam
Copy link

I'd like to contribute upon some additional details and understanding. Is there a place that I can start?

@ladyada
Copy link
Member

ladyada commented Oct 1, 2020

@sakethramanujam you would need a sensor, do you have one?

@sakethramanujam
Copy link

I'd need a sensor. Where can I procure one from?

@ladyada
Copy link
Member

ladyada commented Oct 1, 2020

we sell them at adafruit, but you could get them anywhere as long as its an LSM6DS series

@sakethramanujam
Copy link

sakethramanujam commented Oct 2, 2020

Trying to find one at my local store and on e-stores.

[EDIT]
I'm sorry for a delayed response, I could not find the component on local stores.

@jposada202020
Copy link
Contributor

@pslade2 hello, any luck getting the sensor? thanks. :)

@drewskoots
Copy link

Any update on this?

@rjsdotorg
Copy link

rjsdotorg commented Mar 16, 2025

I have a 4517 and 4565, currently wired for I2C and running.
Pi zero 2 W BTW.
Once I work out some other things I will need to go to SPI, as the bandwidth for 9 channels + temp at max rates eat up I2C.
I went from Pico to Pi Zero2 W as I found that the Pico struggles to just sample and save data at high rates.

I checked out the LSM6DS code atGithub but as I posted here https://forums.adafruit.com/viewtopic.php?p=1049398#p1049398 " I'm not following (yet) how self.i2c_device is even used as it does not seem to be referenced"

@rjsdotorg
Copy link

There is also an issue mentioned elsewhere of getting (near) simultaneous data from the two chips. It could use a helper function to grab all board data in one go, and document corresponding DRDY wire connection. At St there is some posting on this, like https://community.st.com/t5/mems-sensors/lsm6dsl-int2-lt-gt-lis3mdl-drdy-short-circuit/m-p/775622

Related to this, I2C "Fast Mode" appears to be 400kHz on the Pi driver, but the ST part supports "I²C fast mode +" of 1MHz, and this https://www.abelectronics.co.uk/kb/article/1/i2c-part-2-enabling-i2c-on-the-raspberry-pi, and the Camera Module docs, implies that the Zeros might be able to run at 1MHz. I'll try to test.

@rjsdotorg
Copy link

FYI, I just added frequency=1000000 to the busio.I2C call, and I now can call for all 9 values in a tight loop ~1440/s while storing in a ulab array.
This compares to ~850/s with frequency=400_000, so the Pi Zero 2 W is doing I2C faster.

BTW the Pi Zero 2 W does show as "raspberrypi_zero2w" in board.board_id, but adafruit_platformdetect.Detector() returns None for id and board.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants