olikraus / u8g2

U8glib library for monochrome displays, version 2
Other
5.16k stars 1.05k forks source link

2nd hardware i2c with SSD1306 and a Teensy 4.0 (Arduino IDE) #1459

Closed Maxfojtik closed 3 years ago

Maxfojtik commented 3 years ago

I am trying to run two 128x32 SSD1306 displays. When I was working with just one I had no problems. But then I switched "U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C" to "U8G2_SSD1306_128X32_UNIVISION_F_2ND_HW_I2C" and it does not write anything to the new display. The Scanner example does find both of the displays at the correct addresses, so it is not wiring. I tried to look around the lib myself but sadly I could not completely understand it. It is very organized all things considered.

olikraus commented 3 years ago

The second HW I2C is not supported on all devices.

Maxfojtik commented 3 years ago

If anyone else is having this problem you can fix it by going into U8x8lib.cpp, Control-Fing "Wire1" go into the function around line 1350 and removing any line that has a # in it within that method. It seems like the library does not realize the teensy's actually have more than 1 Wire object but you can force it.

spl01tprivate commented 1 year ago

Thanks, working fine on ESP32-S3-Wroom-1 as well!