Replies: 4 comments 3 replies
-
Well, it is not the first time I read that wish and I already tried to write a constructor, which accepts a two wire object, but I always come to the point that any implementation will consume a lot of effort and time on my end. At least in the near future I wont have time to implement this. Instead my suggestion is to just replace the object in the library itself. I mean, the library is installed in your local folder and you can just modify it according to your needs. For the standard I2C constructor, you just need to replace the Wire object here: Lines 1313 to 1360 in a6843a1 |
Beta Was this translation helpful? Give feedback.
-
Can explain a little more about how to do that? |
Beta Was this translation helpful? Give feedback.
-
For ESP32, is it basically recommended to edit the SSD1306 library to have specified ints for pin numbers in this line?: |
Beta Was this translation helpful? Give feedback.
-
Hello i'm facing the same issue than @jmibk .
If it is ok, does editing U8x8lib.cpp will correct u8g2 class usage since the file is U8x8lib. I'm not sure that u8g2 is an extend of u8x8 Hope i was clear. |
Beta Was this translation helpful? Give feedback.
-
I try to connect a SSD1306 display to a relatively big project that uses already two I2C interfaces on an ESP32.
Now I like to add an SSD1306 display to I2C line 2, where also other devices are connected (with different i2c addresses).
Now I tried to find a consturctor that supports the second I2C line with custom pin mapping, but there isn't any.
Is it possible to pass an TwoWire object to the U8G2 library?
My I2C object looks like: TwoWire I2C_2 = TwoWire(1);
Now I tried to find a constructor like
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, I2C_2); or something else.
Software I2C only for the display isn't an option, because speed and usage of additional pins on the ESP32 (I use already ethernet, CAN, SD card, two I2C lines, RS232 and some relays).
Is there a way to use an existing TwoWire object with this library?
Beta Was this translation helpful? Give feedback.
All reactions