Skip to content
New issue

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

Can the I2C bus be reused for other devices? #2553

Open
Xerxes31415 opened this issue Dec 19, 2024 · 2 comments
Open

Can the I2C bus be reused for other devices? #2553

Xerxes31415 opened this issue Dec 19, 2024 · 2 comments
Labels

Comments

@Xerxes31415
Copy link

I'm working on a project that uses this library to drive a display. The new revision of the board added a power monitor (INA219), but I've been having a hell of a time integrating the two.

The most common error I'm getting is [E][Wire.cpp:526] write(): NULL TX buffer pointer. I'm using the Adafruit INA219 Arduino library.

Is there something fundamental to the u8g2 project that prevents sharing of the I2C bus?
Is there an example project that uses the I2C bus for the both the display and another device?

Thanks in advance!

@olikraus
Copy link
Owner

Is there something fundamental to the u8g2 project that prevents sharing of the I2C bus?

Yes, the configuration of the I2C bus, see also note 2 here: https://github.com/olikraus/u8g2/wiki/u8g2reference#setbusclock

Assign the same clock rate used for the INA219 sensor also to u8g2.

@Xerxes31415
Copy link
Author

OK, good to know. I will give that a try.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants