Browse Source

change Serial2 (SDS011) connection, enable PSRAM

main
Hendrik Langer 5 years ago
parent
commit
d645d4b44f
  1. 4
      README.md
  2. 4
      platformio.ini
  3. 1
      src/main.cpp

4
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

4
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}\""

1
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;

Loading…
Cancel
Save