mirror of
https://github.com/esphome/esphome.git
synced 2024-12-26 23:41:45 +01:00
Corrected ESP32 hardware UART pins (#701)
The UART pins for Serial1 and Serial2 on the ESP32 were reversed.
This commit is contained in:
parent
15b87af8ed
commit
655327a8b1
1 changed files with 2 additions and 2 deletions
|
@ -20,9 +20,9 @@ void UARTComponent::setup() {
|
|||
// is 1 we still want to use Serial.
|
||||
if (this->tx_pin_.value_or(1) == 1 && this->rx_pin_.value_or(3) == 3) {
|
||||
this->hw_serial_ = &Serial;
|
||||
} else if (this->tx_pin_.value_or(9) == 9 && this->rx_pin_.value_or(10) == 10) {
|
||||
} else if (this->tx_pin_.value_or(10) == 10 && this->rx_pin_.value_or(9) == 9) {
|
||||
this->hw_serial_ = &Serial1;
|
||||
} else if (this->tx_pin_.value_or(16) == 16 && this->rx_pin_.value_or(17) == 17) {
|
||||
} else if (this->tx_pin_.value_or(17) == 17 && this->rx_pin_.value_or(16) == 16) {
|
||||
this->hw_serial_ = &Serial2;
|
||||
} else {
|
||||
this->hw_serial_ = new HardwareSerial(next_uart_num++);
|
||||
|
|
Loading…
Reference in a new issue