-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Two Displays with non-default I2C-Pins at ESP32S3 #2206
Comments
U8g2 just passes the arguments to the (none-standard) wire function of the ESP32 board software: Lines 1343 to 1354 in 74e379c
|
So it seems there is no chance to solve it and the only solution is to redesign the PCB ... Your code calls Wire.begin() in any case, either with or without SDA/SCL. Thanks! |
Got it! |
It also sounds strange to me, but I am happy you found a solution :-) |
Yes.... but maybe its a fluke only ... |
Yes, i know... that might be better. However the code impact would be huge and I don't have time to change this at the moment. |
@ams-hh, Ihave landed on this same issue. using i2c 64x32 OLEDs, with no address pin breakout. Using esp32s1 with dual i2c buses. i have been fighting this issue for years off and on as a hobbyist and assumed i wasn't using the libraries correctly. would you mind posting your code? if the solution is possibly just in the order of operations, would be invaluable to see code that is working. thanks! |
Hello FriqueNFraque,
I fought with the second issue.
And after that, start work with:
and
The defines in these examples are:
and
After that, everything works. |
Dear Olikraus
at first: Thank you for this magnificant library and the work you had with it!
I have the following issue:
On a custom board with ESP32-WROOM-32 support two OLED-Display
128x64, SH1106, Ic2-Address 0x3d
128x34, SH1306, Ic2-Address 0x3c
Until now I used the default-Pins SDA:21, SCL:22 for this Microcontroller and everything works as
expected.
Now I've made a PCB rebuild and use ESP32S3-WROOM-1.
Every documatentation said: "You can use every Pins for I2C"
So I did SDA:2, SCL:4
And in the construcor I used the 3rd and 4. Parameter for the GPIO.
And now the trouble started.
The first Line -Output on the first display is working.
When for the second Display the u8g2.begin() is executed, the system hangs until a timeout.
(You call in begin() init_display(). There it hangs.)
And when after the timeout I try to write a second line on the first Display, it does hang as well.
The #defines SDA and SCL are predefined somewhere. When compiled and loaded into an
ESP32-WROOM-32 they show 21/22.
I now learned, when compiled and loaded into an ESP32S3-WROOM-1 they show 8/9.
With my development-system I've made the following tests with the program see below:
**** ES32-WROOM_32: ****
One Display, default-Pins, Constructor without I2C-Pin-Parameter >>> works
One Display, non-default-Pins, Constructor WITH I2C-Pin-Parameter >>> works
Two Displays, default-Pins, Constructor without I2C-Pin-Parameter >>> works
Two Displays, non-default-Pins, Constructor WITH I2C-Pin-Parameter >>> works
**** ES32S3-WROOM-1: ****
One Display, default-Pins, Constructor without I2C-Pin-Parameter >>> works
One Display, default-Pins, Constructor WITH I2C-Pin-Parameter >>> works
Two Displays, default-Pins, Constructor without I2C-Pin-Parameter >>> works
Two Displays, default-Pins, Constructor WITH I2C-Pin-Parameter >>> hangs at Second Display begin()
Two Displays, non-default-Pins, Constructor WITH I2C-Pin-Parameter >>> hangs at Second Display begin()
So it seems to be dependend form the use of the constructor parameters for SCL/SDA GPIO.
I could now redesign the PCB once again and use 8/9.
Or do you have an idea how to solve this other way?
Thank you in advance and regards from Hamburg
Andree
Test-Program.
Use #define (un)commenting for the Test cases.
The text was updated successfully, but these errors were encountered: