From cebd8704c8e4eff334124fe8c96b23f788a1dde3 Mon Sep 17 00:00:00 2001 From: Patrick Van Oosterwijck Date: Sun, 3 Mar 2019 07:51:43 -0700 Subject: [PATCH] Default pin remap for wESP32 (#2508) * Add default pin mapping for Serial1 and Serial2 * Default pin remap on wESP32 Improved default pin mapping for I2C0 and UART1 to avoid issues with programming. SDA0 was on IO2 but IO2 needs to be pulled low on reset to enable serial programming, which conflicts with I2C pull-ups. RX1 was on IO12, idle UART level is high which conflicts with IO12 needing to be low on reset to select correct 3.3V flash voltage. New mappings: SDA0 on IO15 RX1 on IO13 TX1 on IO12 --- variants/wesp32/pins_arduino.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/variants/wesp32/pins_arduino.h b/variants/wesp32/pins_arduino.h index 3565791d..c3790504 100644 --- a/variants/wesp32/pins_arduino.h +++ b/variants/wesp32/pins_arduino.h @@ -11,8 +11,8 @@ #define digitalPinToInterrupt(p) (((p)<40)?(p):-1) #define digitalPinHasPWM(p) (p < 34) -#define TX1 13 -#define RX1 12 +#define TX1 12 +#define RX1 13 #define TX2 33 #define RX2 39 @@ -20,7 +20,7 @@ static const uint8_t TX = 1; static const uint8_t RX = 3; static const uint8_t SCL = 4; -static const uint8_t SDA = 2; +static const uint8_t SDA = 15; static const uint8_t SS = 5; static const uint8_t MOSI = 23;