Skip to content

Passing TwoWire argument is kind of ignored (bug) #2

@Martin12350

Description

@Martin12350
PCF8574(TwoWire &wire, int address) {
	this->address = address;
	this->wire = &wire;
	Wire.begin();
	Wire.setClock(PCF8574_CLOCK);
}

When passing TwoWire into constructor, static Wire is used regardless.
Meaning that if you use multiple Wires and expecting this library not to mess with Wire by passing argument,
it will not only work as expected, but cause you huge headache :D

Easy fix:

_wire->begin();
_wire->setClock(PCF8574_CLOCK);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions