You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to touch base with you about some refactoring that I"m about to do, and also adding support for SoftwareWire functionality that I need.
Here are some of the changes that I intend to make, and I wanted your input and thoughts in case you might think about accepting a pull request back.
Adding SoftwareWire support: I need to use SoftwareWire to change the pins that I am using for I2C. I found a "nice" way that Sparkfun implemented this in their BME280 library, and I've now implemented it a few times. It adds a few new constructors that allow the Wire or SoftwareWire object to be passed in, along with the I2C address.
Adding a "isPresent()" method to test for the chip being present on the I2C bus at the current I2C address.
Adding a "setI2CAddress()" method to allow the I2C Address to be changed on the fly. Support for multiple chips.
Getting rid of the "#if ARDUINO >= 100" options as it seems that we are well past the time of needing this? It makes the support of hard and soft I2C select logic that much more complex. I could be convinced differently on this, and will see as I get going on the refactoring.
I'll be working on all of this today in the next few hours ... but wanted to get any feedback and ideas from you to make a future pull request cleaner.
The text was updated successfully, but these errors were encountered:
I completed the SoftwareWire integration. I've been testing and running it and it seems to be working.
I added the isPresent() method, and it also appears to be working.
I added the setI2CAddress() method and it also appears to be working.
I left all of the "#if ARDUINO >= 100" options ... it wasn't too hard to just leave it there. I have not tested with a version of the environment that old though.
I wanted to touch base with you about some refactoring that I"m about to do, and also adding support for SoftwareWire functionality that I need.
Here are some of the changes that I intend to make, and I wanted your input and thoughts in case you might think about accepting a pull request back.
Adding SoftwareWire support: I need to use SoftwareWire to change the pins that I am using for I2C. I found a "nice" way that Sparkfun implemented this in their BME280 library, and I've now implemented it a few times. It adds a few new constructors that allow the Wire or SoftwareWire object to be passed in, along with the I2C address.
Adding a "isPresent()" method to test for the chip being present on the I2C bus at the current I2C address.
Adding a "setI2CAddress()" method to allow the I2C Address to be changed on the fly. Support for multiple chips.
Getting rid of the "#if ARDUINO >= 100" options as it seems that we are well past the time of needing this? It makes the support of hard and soft I2C select logic that much more complex. I could be convinced differently on this, and will see as I get going on the refactoring.
I'll be working on all of this today in the next few hours ... but wanted to get any feedback and ideas from you to make a future pull request cleaner.
The text was updated successfully, but these errors were encountered: