diff --git a/README.md b/README.md index ff916ca..184cf30 100644 --- a/README.md +++ b/README.md @@ -64,8 +64,8 @@ Serial (HardwareSerial2) SDS011 pin | ESP32 pin | Notes -----------|-----------|---------- -TXD | IO16 | -RXD | IO17 | +TXD | IO15 | (don't use IO16 together with PSRAM) +RXD | IO2 | (don't use IO17 together with PSRAM) GND | GND | 25µm | nc | 5V | VUSB | 5V diff --git a/platformio.ini b/platformio.ini index d503fed..59f4401 100644 --- a/platformio.ini +++ b/platformio.ini @@ -21,8 +21,8 @@ build_flags = ; -DLOG_DEFAULT_LEVEL=ESP_LOG_VERBOSE ; -DLOG_LOCAL_LEVEL=ESP_LOG_VERBOSE ; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE -; -DBOARD_HAS_PSRAM -; -mfix-esp32-psram-cache-issue + -DBOARD_HAS_PSRAM + -mfix-esp32-psram-cache-issue -DWIFI_SSID="\"${sysenv.WIFI_SSID}\"" -DWIFI_PASSWD="\"${sysenv.WIFI_PASSWD}\"" -DWIFI_SSID2="\"${sysenv.WIFI_SSID2}\"" diff --git a/src/main.cpp b/src/main.cpp index 42a9cdc..558e28d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -738,6 +738,7 @@ void sendValues() { void setup() { Serial.begin(115200); + Serial2.begin(9600, SERIAL_8N1, /*rx*/15, /*tx*/2); // IMPORTANT: don't run with default pins 16, 17 as they are connected to PSRAM on boards that ship with it esp_sleep_wakeup_cause_t wakeup_reason = esp_sleep_get_wakeup_cause(); ++bootCount;