-
Notifications
You must be signed in to change notification settings - Fork 264
Wemos OLED Lolin32 - Port #864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
costa-victor
wants to merge
4
commits into
Moddable-OpenSource:public
from
costa-victor:wemos_oled_lolin32-port
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b266725
feat: add porting changes for board based on Heltec WiFi Kit 32
costa-victor afa8118
docs: add new target on esp32 documentation
costa-victor 3cbfac7
docs: fix copyright block
costa-victor 3f85645
refactor: remove unused pins from provider
costa-victor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
build/devices/esp32/targets/wemos_oled_lolin32/host/provider.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| /* | ||
| * Copyright (c) 2021 Moddable Tech, Inc. | ||
| * | ||
| * This file is part of the Moddable SDK Runtime. | ||
| * | ||
| * The Moddable SDK Runtime is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU Lesser General Public License as published by | ||
| * the Free Software Foundation, either version 3 of the License, or | ||
| * (at your option) any later version. | ||
| * | ||
| * The Moddable SDK Runtime is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU Lesser General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Lesser General Public License | ||
| * along with the Moddable SDK Runtime. If not, see <http://www.gnu.org/licenses/>. | ||
| * | ||
| * FIXME: Analog port needs updating. | ||
| * NOTES: Not sure how the I2C screen works here. | ||
| * NOTES: Pins LED is updated. backlight: 18, displayDC: 2, displaySelect: 15 are placeholders. | ||
| * Pinout is referenced below. | ||
| * https://resource.heltec.cn/download/WiFi_Kit_32/WIFI_Kit_32_pinoutDiagram_V2.pdf | ||
| */ | ||
|
|
||
| /** | ||
| * NOTES: There is no built-in LED's | ||
| * Pinout is referenced below: | ||
| * https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2019/07/lolin32-oled-pinout.jpg | ||
| * | ||
| */ | ||
|
|
||
| import Analog from "embedded:io/analog"; | ||
| import Digital from "embedded:io/digital"; | ||
| import DigitalBank from "embedded:io/digitalbank"; | ||
| import I2C from "embedded:io/i2c"; | ||
| import PulseCount from "embedded:io/pulsecount"; | ||
| import PWM from "embedded:io/pwm"; | ||
| import Serial from "embedded:io/serial"; | ||
| import SMBus from "embedded:io/smbus"; | ||
| import SPI from "embedded:io/spi"; | ||
|
|
||
| const device = { | ||
| I2C: { | ||
| default: { | ||
| io: I2C, | ||
| data: 21, | ||
| clock: 22 | ||
| } | ||
| }, | ||
| Serial: { | ||
| default: { | ||
| io: Serial, | ||
| port: 1, | ||
| receive: 3, | ||
| transmit: 1 | ||
| } | ||
| }, | ||
| SPI: { | ||
| default: { | ||
| io: SPI, | ||
| clock: 18, | ||
| in: 19, | ||
| out: 23, | ||
| port: 1 | ||
| } | ||
| }, | ||
| Analog: { | ||
| default: { | ||
| io: Analog, | ||
| pin: 35 | ||
| } | ||
| }, | ||
| io: {Analog, Digital, DigitalBank, I2C, PulseCount, PWM, Serial, SMBus, SPI}, | ||
| pins: { | ||
| button: 0 | ||
| } | ||
| }; | ||
|
|
||
| export default device; | ||
29 changes: 29 additions & 0 deletions
29
build/devices/esp32/targets/wemos_oled_lolin32/manifest.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| { | ||
| "include": [ | ||
| "$(MODDABLE)/modules/drivers/ssd1306/manifest_i2c.json" | ||
| ], | ||
| "config": { | ||
| "screen": "ssd1306", | ||
| "touch": "", | ||
| "format": "Gray256" | ||
| }, | ||
| "defines": { | ||
| "i2c": { | ||
| "sda_pin": 21, | ||
| "scl_pin": 22 | ||
| }, | ||
| "spi": { | ||
| "miso_pin": 19, | ||
| "mosi_pin": 23, | ||
| "sck_pin": 18 | ||
| }, | ||
| "ssd1306": { | ||
| "hz": 400000, | ||
| "width": 128, | ||
| "height": 64, | ||
| "sda_pin": 5, | ||
| "scl_pin": 4, | ||
| "rst_pin": 16 | ||
| } | ||
| } | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.