-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
support for lis3dh accelerometer #6477
Conversation
As far as I can tell, the LIS2DH and LIS3DH are register compatible. There should be no need to create extra driver modules for it. klipper/klippy/extras/mpu9250.py Lines 12 to 21 in 9f41f53
Please also refer to point 3 in "What to expect in a review" in master/docs/CONTRIBUTING.md and provide a signed off by line. |
Signed-off-by: pengkua [email protected] |
Squash the commits into one and add a sign off there; make sure you follow the contributing guide for the format. Do you need testers? If this is stable I can try it on a Duet3D 1LC. |
dfa0765
to
c3b6fe6
Compare
Signed-off-by: pengkua [email protected]
Thank you for your reminder. |
I am testing your code. After some simple setup, I can use "ACCELEROMETER_QUERY chip=lis3dh" to query the data. I also tried specifying the chip with suffix "CHIPS=lis3dh" or 'CHIPS="lis3dh" ' and so on, none of them worked. Did I miss something? Thx. |
I've aleady pointed this out on the Discord, but I think I'll replicate it here:
My idea is to permanently put the LIS2SH on the delta's effector, and then try using the ADC for a hall effect filament width sensor (or at least a filament presence sensor). It's cheaply (~40c) available on jlcpcb, making them interesting for anyone looking to fabricate a hobby PCB (Caveat emptor: The aux ADC should survive Vcc, but its input range is actually 0.8-1.6V). |
@archi I was studying Klipper, and my intention was to not modify the code to add features. I was afraid that my changes would cause unpredictable errors. [ May I ask a question ] lis3dh_query the function, it seems that lis3dh cannot read continuously from 0x28 like lis2dw.
The ADC above can indeed do some interesting things, but I don't think ADC will be missing in Toolhead's MCU. |
It is now working flawlessly now! It turned out that I stupidly forgot to comment out my old config of adxl. However, I dont know why use the coommand with the chip specified did not work (Could also be my misuse of command lol) Anyways, thank you for your contribute! It makes my SHT36 canboard more worthy now XD |
Thanks. I think it would be useful to add support for lis3dh. Some comments:
You can either update this PR or create a new one if you prefer.
Many SPI and I2C devices support multiple reads per transaction. Have you tested that it does not work on the lis3dw? -Kevin |
It looks like this GitHub Pull Request has become inactive. If there are any further updates, you can add a comment here or open a new ticket. Best regards, PS: I'm just an automated script, not a human being. |
No description provided.