Skip to content
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

Create adxl345spi_with_chipselect.c #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

opcodex64
Copy link

I have added the ability to select the "chipselect" for the SPI interface (CS_EN0 or CS_EN1) to make the usage of multiple ADXL345 possible. It should be noted that a simultenous usage is not possible since only one SPI interface is available. However, it is possible to access to ADXL345 in a series way. Maybe this will be useful for some users. In my use case I need two ADXL345, therefore this modification was necessary.

Notes:
The new argument for selecting chipselect is "-c or --csel". The value to pass is an integer (0=CS_EN0, 1=CS_EN1).
If you wan to use the modified driver, please replace the original file with this one ! (dont forget to rename it in "adxl345spi.c")

opcodex64

I have added the ability to select the "chipselect" for the SPI interface (CS_EN0 or CS_EN1) to make the usage of multiple ADXL345 possible. It should be noted that a simultenous usage is not possible since only one SPI interface is available. However, it is possible to access to ADXL345 in a series way. Maybe this will be useful for some users. In my use case I need two ADXL345, therefore this modification was necessary. 

Notes:
The new argument for selecting chipselect is "-c or --csel". The value to pass is an integer (0=CS_EN0, 1=CS_EN1).
If you wan to use the modified driver, please replace the original file with this one ! (dont forget to rename it in "adxl345spi.c")

opcodex64
@DX94-Quas
Copy link

Thanks for this fork, pgpio does not support using the other auxiliary ports (3-6) that come in the Raspberry Pi 4

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

Successfully merging this pull request may close these issues.

2 participants