AvinasheeTech / MCP23008_I2C

library to support application development using mcp23008 i/o expander
GNU General Public License v3.0
0 stars 0 forks source link

Remove dependency for Wire library #1

Open hasenradball opened 6 days ago

hasenradball commented 6 days ago

Hi,

thank you for building such a great library. I would suggest a small improvement.

Actually you have a dependency implemented by The „Wire“ library.

I would suggest to give the address of Wire object as parameter for begin, instead giving the pins. Then you have one dependency less and others can als use the library with the wire2 instance.

Best Frank

Do you know what I mean?

hasenradball commented 5 days ago

here you see an example how it could look like in a header file:

image

Here you can see how it works in cpp file:

image

Then you can use the wire reference like this:

image