• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Heltec Wifi_kit_32 vs Heltec WiFi_Lora_32_v2 with OLED

Q&A Forum › Heltec Wifi_kit_32 vs Heltec WiFi_Lora_32_v2 with OLED
0 Vote Up Vote Down
Michal Smialowski asked 3 years ago

I have these two different esp32 boards. Both have OLED displays.

I am using Micropython ( Thonny editor) to program the ssd 1306 display.

According to the pinouts the boards have the same SDA , SCL and RST pins. ( 4, 15 , 16 respectively)

I have it set up so that the main.py program reads the voltage from a POT on an ADC port (pin 36).

The program works fine on the wifi_kit_32 board and displays the voltage , but on the Lora board, it prints out the

voltage in the terminal screen but not on the OLED. I used the 0x3C  I2C address for both boards.

I ran I2C scanner and it printed out about 50 I2C addresses, no idea why, but it didn’t help me find out if the address on the Lora board is different.

Thanks for the help

Mike

 

 

10 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
Double-check the pins that the OLED display of your LoRa boards is connected to.
It may not be connected to the default board’s I2C pins. It might be connected to other pins.
Regards,
Sara

0 Vote Up Vote Down
Michal Smialowski answered 3 years ago

HI Sara,
Thanks for the quick reply. It is almost impossible to tell. There is multiconductor ( approx 20 lines) flat cable running from the OLED to the surface of the boards. The multiconductor cable and its location look identical on both Heltec boards. The best that I can do is assume that they are the same. If you can think of another way to check more definitively, then I wlll try that.
tnx
Mike

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Send me a link to the LoRa board that you have.
I’ll see if I can find the pinout.
Regards
Sara

0 Vote Up Vote Down
Michal Smialowski answered 3 years ago

Hi Sara,
Here is the link to the Heltec Lora board

ESP32 LoRa Heltec v2 with display – pinout diagram


and here is the link to the Heltec Kit board
https://resource.heltec.cn/download/WiFi_Kit_32/WIFI_Kit_32_pinoutDiagram_V2.pdf
Hope that this helps. I see that the physical layout of the pins is different between the two boards.
tnx
Mike

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
It seems that the board uses GPIOs 4 (SDA) and 16 (SCL) for the OLED.
So, you must tell the code to use those pins when initializing the OLED.
We have an I2C guide that shows how to use other I2C pins different than the default. https://randomnerdtutorials.com/esp32-i2c-communication-arduino-ide/#3
 
Let me know if this helps.
Regards,
Sara
 

0 Vote Up Vote Down
Michal Smialowski answered 3 years ago

Thanks Sara for the reply.
I will read the link and see if that helps.
Cheers and Thank you.
Mike

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Ok.
Then, let me know how it went.
Regards,
Sara

0 Vote Up Vote Down
Michal Smialowski answered 3 years ago

Hi Sara,
I now have the Heltec Lora esp32 OLED display working.
I found this snippet of code online and using the pull_up resistors seems to have made the difference.
 
 

# Heltec LoRa 32 with OLED Display
oled_width = 128
oled_height = 64
# OLED reset pin
i2c_rst = Pin(16, Pin.OUT)
# Initialize the OLED display
i2c_rst.value(0)
sleep(0.010)
i2c_rst.value(1) # must be held high after initialization
# Setup the I2C lines
i2c_scl = Pin(15, Pin.OUT, Pin.PULL_UP)
i2c_sda = Pin(4, Pin.OUT, Pin.PULL_UP)
# Create the bus object
i2c = I2C(scl=i2c_scl, sda=i2c_sda)
# Create the display object
oled = ssd1306.SSD1306_I2C(oled_width, oled_height, i2c)
oled.fill(0)
oled.text('Hello, World 1!', 0, 0)
oled.text('Hello, World 2!', 0, 10)
oled.text('Hello, World 3!', 0, 20)
oled.text('Hello, World 4!', 0, 30)        
oled.show()

Thanks for your help and prompt replies.

Michal

 

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Great!
So, is everything working right now?
Can I close this issue?
Rgards,
Sara

0 Vote Up Vote Down
Michal Smialowski answered 3 years ago

Yes, the OLED is working. Please close the issue.
tnx
Mike

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.