B4R Question ESP32 / WIFI_KIT_V2 HELTEC with OLED 128/64

skyracer90

Member
Licensed User
Longtime User
Hello community,
I still despair with the part. The whole weekend but unsuccessful ...
The board and OLED work via Arduino SDK. Via B4R I just don't get the OLED to light up ... Does anyone have an idea? I've already tried all the examples and pins.

B4X:
Sub Process_Globals
    Public Serial1 As Serial
    Private SSD As AdafruitSSD1306
End Sub

Private Sub AppStart
    Serial1.Initialize(115200)
    Log("AppStart")
    SSD.InitializeHSPI(4, 16, 15)
    'SSD.InitializeI2C(16,0x3c)
    SSD.ClearDisplay
    SSD.GFX.ConfigureText(1, SSD.WHITE, False)
    SSD.GFX.DrawText("Try text")
    SSD.Display
End Sub
 

Attachments

  • oled_pin.JPG
    oled_pin.JPG
    100.3 KB · Views: 244

Daestrum

Expert
Licensed User
Longtime User
I couldn't get it to work without using the Heltec libraries.
 
Upvote 0

Mark Read

Well-Known Member
Licensed User
Longtime User
Just a thought, according to the link here, you need to register the Lora Gateway. Have you done this?

Regards
Mark
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Just a thought, according to the link here, you need to register the Lora Gateway. Have you done this?

Regards
Mark
Heltec produces several ESP32 based boards, some with an LCD, some with LoRA, some with both...
Since the OP only mentioned the LCD issues... I'm guessing it's a ESP32+LCD combo board.
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
quick and dirty example using heltec drivers
 

Attachments

  • onbrdscrn.zip
    1.8 KB · Views: 200
Upvote 0

amorosik

Expert
Licensed User
quick and dirty example using heltec drivers

What exactly do you mean by 'Heltec driver'?
When I connect the Heltec module to the usb port, no new peripherals are recognized, and no ComX ports are added
What is necessary to install to 'see' the Heltec module as a ComX port and then be able to load the code from the B4R environment to the Heltec module?
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
Let me check which one I use

Heltec_ESP32_Dev-Boards
 
Upvote 0

skyracer90

Member
Licensed User
Longtime User
Thank you Daestrum,
now it's working. Right away with the first B4R project ... Now, thanks to your help, I can get started. Thanks to all..
P.S: Mark Read, it is only the WIFI KIT 32 without "LORA". Thanks anyway..
 
Upvote 0

amorosik

Expert
Licensed User
Yes now first program on Heltec, 'is born'
Oled display can show anything, yeeeaaaaaahhhhhh
And now to drive i/o pins, and to drive pwm outputs how to do?
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Yes now first program on Heltec, 'is born'
Oled display can show anything, yeeeaaaaaahhhhhh
And now to drive i/o pins, and to drive pwm outputs how to do?
Just used the Search functionality of the forum...
 
Upvote 0

amorosik

Expert
Licensed User

Thank you very much for the useful information
Now I immediately try to put down some code
But how to understand the physical correspondence of the pins on the module, with the name of the pin to be used on the program?
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
For that you need to search for your board's pilot diagram... a simple Google search should do the trick
 
Upvote 0

amorosik

Expert
Licensed User
This is Heltec Wifi Kit 32 pin diagram
On different pins the indication is not unique, for example pin 26 also shows ADC2_9 and DAC1
And therefore, can the same physical pin take on a different number (26, 2_9, 1)?
No dedicated pin as pwm output?
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
This is Heltec Wifi Kit 32 pin diagram
On different pins the indication is not unique, for example pin 26 also shows ADC2_9 and DAC1
And therefore, can the same physical pin take on a different number (26, 2_9, 1)?
No dedicated pin as pwm output?
Almost every pin in ESPxxxxxx boards have multiple functions. In the case you pointed out, you can have it outputting an analog voltage converted from code or have an input digital value read into an analog value.
Each pin must be configured previously as either input or output, wich is done with the D1Pin declaration.
Something like:
B4X:
Dim p As Pin p.Initialize(p.A6,p.MODE_INPUT
When using libs that target specific pins, usually this declaration is done inside the library.
 
Upvote 0

amorosik

Expert
Licensed User
Is it possible to permanently store information on cards of this type, Heltec wifi kit 32?
For example of the calibration values, or similar that must remain stored even in the absence of board voltage
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Please start a new thread as this is a new question. It will help other help you.
 
Upvote 0
Top