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

Doesn't work with ESP32-C3 #2226

Open
berkut0 opened this issue Jul 17, 2023 · 11 comments
Open

Doesn't work with ESP32-C3 #2226

berkut0 opened this issue Jul 17, 2023 · 11 comments

Comments

@berkut0
Copy link

berkut0 commented Jul 17, 2023

I tried almost every combination on my Wemos C3 mini and none of the options worked. I've tried putting an I2C address, changing SDA and SCL, combining settings, but all to no avail. There is some kind of bug, as there are libraries that work with the same device fine

For example, that works: https://github.com/ThingPulse/esp8266-oled-ssd1306

@olikraus
Copy link
Owner

Which constructor did you use

@berkut0
Copy link
Author

berkut0 commented Jul 18, 2023

I tried all combinations of 128x64 I2C with different pin combinations.

Screenshot

@berkut0
Copy link
Author

berkut0 commented Jul 23, 2023

I think it's related
#1720
I went the same way, tried setting I2C address, manipulating pins, wiring
But certainly the issue in not in the wiring or i2c address - there are libraries that work with known pins and address

@olikraus
Copy link
Owner

For u8g2 the i2c address has to be multiplied by 2 (see reference manual).

@berkut0
Copy link
Author

berkut0 commented Jul 23, 2023

You're amazing!
Thank you so much!

I'm not sure where to find this in the reference manual (I've searched and haven't found it). But it works!

Doubled I2C address works!

@olikraus
Copy link
Owner

Here: https://github.com/olikraus/u8g2/wiki/u8g2reference#seti2caddress

See the argument description. There are also several issues related to this question.

@berkut0
Copy link
Author

berkut0 commented Jul 23, 2023

Should it always be doubled, no matter if it's C3 or another chip?

@olikraus
Copy link
Owner

Yes.

@berkut0
Copy link
Author

berkut0 commented Jul 25, 2023

Thank you!
I don't want to be intrusive, but I feel like there's a certain heterogeneity. Let's say it's necessary. Can we make this more obvious, at least in examples? I have never worked with an i2c device where the address had to be doubled. I'm not the kind of experienced developer who can say that it's not a common thing, but it really feels like a very specific detail

@schuppeste
Copy link

schuppeste commented Nov 8, 2023

Maybe, the Bus clock, in Standard in arduino esp32 it is fixed to 1MHz.. the ssd1306 has a Maximum specification on 400Khz. I cant find the u8G2 init to 400khz in source.

You can try u8g2.setBusClock(400000); before u8G2.begin()?

My fail? I dont have a C3 to Test it.

@olikraus
Copy link
Owner

olikraus commented Nov 8, 2023

Thank you! I don't want to be intrusive, but I feel like there's a certain heterogeneity. Let's say it's necessary. Can we make this more obvious, at least in examples? I have never worked with an i2c device where the address had to be doubled. I'm not the kind of experienced developer who can say that it's not a common thing, but it really feels like a very specific detail

Hmm, I guess I missed to answer this.
This topic has been discussed very often meanwhile here in this project. I agree, that this "double" value of the i2c address is unusual and maybe wrong. However there are examples, where the "doubled" i2c address is used by the display vendor.

See here for further info: #821

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

No branches or pull requests

3 participants