-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Add board "WEMOS D1 MINI ESP32". #2710
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
423e1d0
Add board "WEMOS MINI D1 ESP32".
dok-net b163894
The name of the board which has its pinout mirrored is actually D1 M…
dok-net 50debbe
D1_MINI32 is a more unique name for this specific board layout.
dok-net 57d8afa
RXD/TXD without 0 correspond to board labels and the default Hardware…
dok-net 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
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
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 |
---|---|---|
|
@@ -27,6 +27,9 @@ | |
}, | ||
{ | ||
"name": "WEMOS LoLin32" | ||
}, | ||
{ | ||
"name": "WEMOS D1 MINI ESP32" | ||
} | ||
], | ||
"toolsDependencies": [ | ||
|
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,33 @@ | ||
#ifndef Pins_Arduino_h | ||
#define Pins_Arduino_h | ||
|
||
#include <stdint.h> | ||
#include <../d32/d32_core.h> | ||
|
||
static const uint8_t LED_BUILTIN = 2; | ||
#define BUILTIN_LED LED_BUILTIN // backward compatibility | ||
static const uint8_t _VBAT = 35; // battery voltage | ||
|
||
#define PIN_WIRE_SDA SDA // backward compatibility | ||
#define PIN_WIRE_SCL SCL // backward compatibility | ||
|
||
static const uint8_t D0 = 26; | ||
static const uint8_t D1 = 22; | ||
static const uint8_t D2 = 21; | ||
static const uint8_t D3 = 17; | ||
static const uint8_t D4 = 16; | ||
static const uint8_t D5 = 18; | ||
static const uint8_t D6 = 19; | ||
static const uint8_t D7 = 23; | ||
static const uint8_t D8 = 5; | ||
static const uint8_t RXD = 3; | ||
static const uint8_t TXD = 1; | ||
|
||
#define PIN_SPI_SS SS // backward compatibility | ||
#define PIN_SPI_MOSI MOSI // backward compatibility | ||
#define PIN_SPI_MISO MISO // backward compatibility | ||
#define PIN_SPI_SCK SCK // backward compatibility | ||
|
||
#define PIN_A0 A0 // backward compatibility | ||
|
||
#endif /* Pins_Arduino_h */ |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember where I found pin numbers 9 and 10 for RXD0/TXD0 - RX and TX are in d32_core.h already. I am unsuccessful in redirecting Serial to vacate 3 and 1, in order to use EspSoftwareSerial for the USB logging port, and have all three HW UARTs freely available. Is this not supported, to redirect the pin assignment of Serial?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you make them to be defines, they will overwrite the default pins for the UARTs:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thank you for explaining, I understand that from reading the code in HardwareSerial.(h|cpp) and esp32-hal-uart.(h|cpp).
But: the code suggests that Serial (0) can be redirected from 3 (RX) and 1 (TX), for the love of it, I can't that to work. Is the UART0 somehow hardwired to these ports and cannot be redirected, even if the code tries to, and fails silently?
As far as the PR is concerned, I've completed it, would you merge it now as it is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you want to run Serial on other pins, you really need to specify them in Serial.begin
RX and TX are hardcoded to 1 and 3 otherwise as that is the real Serial port (like AVR arduinos and such)