-
Notifications
You must be signed in to change notification settings - Fork 46
Support multiple of a device through mux #6
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
Comments
2nd this request. Support for Sparkfun Qwiic I2C Mux would be great! |
Alright! I think I've got a release candidate: OpenLog_Artemis-v14-RC1.zip The branch is here. This is a large change from previous versions of OLA. Instead of creating one class at power on for each library, the classes are created dynamically. During the detection phase, we create a linked list of detected devices. Once detection is complete, pointers from the linked list are pointed to newly formed classes. Each device has its own config setting pointer - this means you can have 17 NAU7802s and configure each one individually. This is how the autodection algorithm works:
What you get is something like this: Note in the image above that there are two VL53L1Xs (a device that has only one I2C address). They both play nicely. There are also 2x BME280 and 2x CCS811. These have different address capabilities, but where hung off of various mux ports for testing. Known issues:
Overall it's a great improvement to flexibility and usability. Please kick the tires and let me know what you find. |
More notes:
|
I had to change the autodetection algorithm slightly:
Seems to work nicely - with the NAU7802 too. This fix is currently only implemented in the V15_Candidate branch. |
Supported in v15. Closing. |
Some I2C devices support only one I2C address but benefit greatly from multiple devices being read. The NAU7802 digital scale is probably at the top of this list.
Additionally, the OLA firmware does not support multiple of a device that does have multi-address support (for example, the LPS25HB). It would be nice to support both of these if possible.
The text was updated successfully, but these errors were encountered: