-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Add board "WEMOS D1 MINI ESP32". #2710
Conversation
variants/mini32/pins_arduino.h
Outdated
static const uint8_t D7 = 23; | ||
static const uint8_t D8 = 5; | ||
static const uint8_t RXD0 = 9; | ||
static const uint8_t TXD0 = 10; |
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.
which serial is this?
Reviewer caught mistake with RXD0/TXD0.
…Serial Serial without 0 naming.
static const uint8_t D7 = 23; | ||
static const uint8_t D8 = 5; | ||
static const uint8_t RXD = 3; | ||
static const uint8_t TXD = 1; |
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:
//this will make Serial1.begin(baud) to run on pins 21 and 22
//add RX2/TX2 to overwrite Serial2
#define RX1 21
#define TX1 22
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)
The "WEMOS D1 MINI ESP32" category of boards provide pin-out compatibility to the family of shields for the popular WEMOS/LOLIN D1 MINI series of ESP8266 boards. In order to make recompiling sketches as easy as possible, this board description includes definitions for the pins of the D1 MINI.
Among the other names for the same board layout are mini32, HW-665, WEMOS TTGO MINI32.