; ESP32-S3 6-channel soil moisture node ; Board: VCC-GND Studio YD-ESP32-S3 (ESP32-S3-DevKitC-1 clone, ESP32-S3-WROOM-1) ; ; Two power profiles, selected by which environment you build: ; pio run -e mains -t upload ; always-on, 5V USB / buck ; pio run -e battery -t upload ; 18650 + TP4056 + solar, deep sleep [platformio] default_envs = mains [env] platform = espressif32@^6.5.0 board = esp32-s3-devkitc-1 framework = arduino ; YD-ESP32-S3 ships in several flash/PSRAM variants (N8, N8R2, N8R8, N16R8). ; These flags target the common N16R8 (16MB flash, 8MB octal PSRAM). ; For an N8 board with no PSRAM, drop the two BOARD_HAS_PSRAM/OPI lines ; and set board_upload.flash_size / board_build.partitions accordingly. board_build.flash_mode = qio board_build.partitions = default_16MB.csv board_upload.flash_size = 16MB monitor_speed = 115200 monitor_filters = esp32_exception_decoder, time lib_deps = knolleary/PubSubClient@^2.8 bblanchon/ArduinoJson@^7.0.4 build_flags = -DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=1 -DBOARD_HAS_PSRAM -DCORE_DEBUG_LEVEL=3 -Wall ; --------------------------------------------------------------------------- ; Continuous power: MCU stays awake, publishes on a fixed interval. ; --------------------------------------------------------------------------- [env:mains] build_flags = ${env.build_flags} -DPOWER_PROFILE_MAINS ; --------------------------------------------------------------------------- ; Solar / battery: RTC-timer wake, sample, publish, deep sleep. ; --------------------------------------------------------------------------- [env:battery] build_flags = ${env.build_flags} -DPOWER_PROFILE_BATTERY