Skip to content

Library is currently hardwired for Wire #4

@PaulZC

Description

@PaulZC

Hi @nseidle / all,
This is an old library, but the MPL3115A2 altitude/pressor sensor is still available and is still a useful sensor.
I tried to connect one to the SCL1/SDA1 pins on the Artemis Thing Plus but found that the library was hardwired for Wire and couldn't get it to connect on the alternate I2C (TwoWire) port(s).
So, I've submitted a pull request ( #3 ) that corrects this. The .begin will still default to Wire, but you can now point it at the alternate TwoWire ports as well. I've also included an example showing how to connect to SCL1/SDA1 on the Thing Plus. I also did a bit of tidying-up and put the register definitions into an enum.
The examples could really do with a full make-over as they don't conform to the new numbering scheme and one of the examples seems to contain a full copy of the library (which also needs updating). But life is short!
Enjoy!
Paul

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions