We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, how to use the lib with an ESP32 (as sample) with two I2C interfaces?
Because of using the predefined Wire functions it is not possible to redefine the interface.
bool CCS811::i2cwrite(int regaddr, int count, const uint8_t * buf) { Wire.beginTransmission(_slaveaddr); // START, SLAVEADDR Wire.write(regaddr); // Register address
Using following code (as sample) - it will not work:
TwoWire I2Cone = TwoWire(0); TwoWire I2Ctwo = TwoWire(1); ... I2Cone.begin(SDA1,SCL1,400000); // SDA pin 21, SCL pin 22 I2Ctwo.begin(SDA2,SCL2,400000); // SDA pin 5, SCL pin 4 builtin OLED ...
As sample in CCS811Core was realized better:
CCS811Core::status CCS811Core::beginCore(TwoWire &wirePort) { CCS811Core::status returnError = SENSOR_SUCCESS; _i2cPort = &wirePort; //Pull in user's choice of I2C hardware //Wire.begin(); //See issue 13 https://github.com/sparkfun/SparkFun_CCS811_Arduino_Library/issues/13 ...
Maybe you could adapt it?
Thanks!
The text was updated successfully, but these errors were encountered:
Like the idea, did not yet have the time.
Sorry, something went wrong.
No branches or pull requests
Hi,
how to use the lib with an ESP32 (as sample) with two I2C interfaces?
Because of using the predefined Wire functions it is not possible to redefine the interface.
Using following code (as sample) - it will not work:
As sample in CCS811Core was realized better:
Maybe you could adapt it?
Thanks!
The text was updated successfully, but these errors were encountered: