Skip to content

Pull request #21 can cause problems #23

Closed
@pilotak

Description

@pilotak

I don't think calling _wire->begin(); in ::init() is a good idea in PR #21 . Lets say on ESP8266 you can remap I2C pins and specify different speed so you init the I2C object outside this class and you pass on as reference.

Adafruit_MCP9808 mcp;

void setup() {
    Wire.begin(SDA_2, SCL_2);
    Wire.setClock(400000);

    mcp.begin(&Wire);
}

I think that _wire->begin() should be only in ::begin() and ::begin(uint8_t addr)

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