Skip to content

Problem with ESP32 wire #17

@japhillips87

Description

@japhillips87

First of all, thanks for this wonderful library. I'm using the PCA9635 for a project and I'm controlling it through an ESP32. After putting a bunch of print statements in this library and the Wire library, I found that when using the PCA9635::begin() function for the ESP32 that accepts the SDA and SCL pin numbers, the _wire->begin(sda, scl) function calls the slave version of the begin() function in the wire library. I was able to get the master version of the begin function by changing the offending line to _wire->begin(sda, scl, (uint32_t)100000);. There is something wonky about the overloading and i'm not sure why it chose one over the other, but by passing the uint32_t frequency, it gets the right one. Now my test sketch is properly running on the ESP32 like it did with the same sketch on an arduino uno.

I'm not sure if this is the correct fix, but it allows me to move forward with my project. I'm happy to provide any more info that you might need to address this. I'm also happy to submit a PR with my change. Just let me know what you prefer.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions