Heltec LoRa I2C library, some clarifications needed


I am a bit confused with the usage of the I2C together with the Heltec library on the Arduino IDE.
I could only get the display working using the Heltec library and not invoking the Wire.h library that appears to be conflicting.
How can I use I2C for other purposes?

  • a) on the same bus (pin15 = SCL/pin4 = SDA) ? without additional library? or do I need a Wire.h for that?
  • b) must I imperatively use the second I2C bus (pin22 = SCL/pin21 = SDA)? without additional library), or do I need a Wire.h for that?
  • c) the pin21 appear to be the Vext control as well. Using the 2nd I2C would then jeopardise that function, isn’t it? have I got the possibility to define the 2nd I2C SDA on another pin?

Let me apologise for asking so much questions, but I didn’t find the answers elsewhere.
Thank you very much for your help

not a specialist here, but I post a question about I²C second bus today too. http://community.heltec.cn/t/am02-module-plus-custom-pcb-minimal-circuit-arduino-compatible/3862/29?u=alexfr

Take a look at the Heltec example I2C_set. For my experience, for using the second I²C bus, using Wire1.begin() doesn’t work. Only Wire.begin(100000,1); works.
I try to use HDC2080, but the library appears to be conflicting with Wire.h too.

AFAIK Pin21 in your case is just controling Vext on or off. If the I2C bus is powered by this power rail, you have to put Vext Low/high during your tests. Check the block diagrams.

Thank you for the feed-back.
I would love to use the I2C of the display for other purposes as well since the number of pins available is not that high…
Have you got an idea, if it is feasible?

Maybe giving more information about the board you use and the screen?

I am using the Heltec32-LoRa V1 board.

This one have integrated oled. Good start point is to study the Oled/factory example by Heltec and the I²C_set example.

Thank you ,
but these examples do no answer my questions about using the OLED I2C for tother modules or using I2C together with the Vext control.

When using IIC, it will have a certain impact on Vext. For WiFi_LoRa32, its IIC pin can use any GPIO, the default pins are 21, 22, you can use Wire.begin(SDA_pin,SCL_pin) to enable other GPIO as IIC pins.

Thank you!
Apperently one can use Wire.begin(SDA_pin,SCL_pin) right from the heltec.h library and shoudl NOT need to include the Wire.h library, right?

The heltec.h library seems to be a compound of several standard libraries.
Is there an overview of which ones are already managed?

Regarding which libraries are included in heltec.h, you can check in heltec.h.