Skip to content

Wemos OLED Lolin32 - Port#864

Closed
costa-victor wants to merge 4 commits into
Moddable-OpenSource:publicfrom
costa-victor:wemos_oled_lolin32-port
Closed

Wemos OLED Lolin32 - Port#864
costa-victor wants to merge 4 commits into
Moddable-OpenSource:publicfrom
costa-victor:wemos_oled_lolin32-port

Conversation

@costa-victor
Copy link
Copy Markdown
Contributor

Environment

Build environment: Linux Mint 20 x86_64
Target device: Wemos OLED Lolin32
Moddable version: public - commit e8efd64
ESPIDF version: v4.4

Description

This is previously discussed here. The porting was based on Heltec WiFi Kit 32 target and it's very similar. The main differences are:

  1. There is no built-in LED's in this board
  2. SDA/SCL pins used for OLED display are different.

More information

After testing a plenty of examples on this board after the porting, it's important to point out that:

  1. Tested the button mapping and it's working.
  2. Tested LED's examples.
  3. LED's based examples crashes the application, as expected, because there is no LED pin declared for this target.
  4. Tested OLED examples and it's working, as showed below:
    wemos-oled-port

@phoddie
Copy link
Copy Markdown
Collaborator

phoddie commented Mar 2, 2022

Congratulations! Very cool to see this working, especially so quickly.

Your code uses GPIO 21 & 22 for I²C while the image you link to for the pinouts uses GPIO 4 & 5. It is clearly working, so maybe it is the wrong image?

backlight: 18, displayDC: 2, displaySelect: 15 are placeholders

Since you are using I²C to communicate with the display, displayDC and displaySelect are unused. You can simply remove them. If this board doesn't have a pin to control the backlight, then you can also remove backlight.

Comment thread build/devices/esp32/targets/wemos_oled_lolin32/host/provider.js
@costa-victor
Copy link
Copy Markdown
Contributor Author

costa-victor commented Mar 2, 2022

Thanks Mr. @phoddie , i'm glad to hear that.

Regarding this point:

Your code uses GPIO 21 & 22 for I²C while the image you link to for the pinouts uses GPIO 4 & 5. It is clearly working, so maybe it is the wrong image?

I followed the Heltec target example and it does the same, because the GPIO 21 & 22 are the default pins for I2C. I was in doubt about it, then I founded this at the documentation.

If not present, they may be provided by the constructor as the scl and sda properties of the dictionary. If they are not passed to the constructor, the default I2C interface is used.

So, I think it's correct and it works without changing the default I2C pins.

@phoddie
Copy link
Copy Markdown
Collaborator

phoddie commented Mar 2, 2022

Regarding I²C, I understand now: you are leaving the default I²C bus on GPIO 21 & 22 and using GPIO 4 & 5 for the display's I²C bus. That's fine.

@costa-victor
Copy link
Copy Markdown
Contributor Author

Closing because this has already been authorized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants