Skip to content

A microcontroller-based system for automated plant watering with ESP32. Monitor soil moisture and control watering pump.

Notifications You must be signed in to change notification settings

psytraxx/esp32-homecontrol-no-std-rs

Repository files navigation

ESP32 Plant Watering System

A microcontroller-based system for automated plant watering with ESP32. Monitor soil moisture and control the watering pump.

Built for LilyGO T-Display-S3 ESP32-S3 development board

T-Display-S3 Board

Board Features:

  • ESP32-S3 dual-core MCU
  • 1.9" LCD Display (170x320)
  • USB-C connector
  • Built-in battery management

Wiring

  • DHT11 Digital (Temperature/Humidity) → GPIO1
  • Water Pump Relay → GPIO2
  • Battery Voltage → GPIO4
  • Moisture Analog → GPIO11
  • Moisture Power → GPIO18
  • Water Level Analog → GPIO12
  • Water Level Power → GPIO21

Core Features

  • Sensor Integration

    • DHT11 temperature/humidity monitoring
    • Capacitive soil moisture sensing (analog)
    • Water level detection
    • Battery voltage monitoring
  • Display Interface

    • ST7789 LCD support
    • Real-time sensor data visualization
    • System status display
  • Network Connectivity

    • WiFi connection with DHCP
    • MQTT integration with Home Assistant
    • Auto-discovery of sensors
    • Remote pump control
  • Power Management

    • Deep sleep support
    • Configurable wake/sleep cycles
    • Battery-optimized operation

Dependencies

The project uses several Rust crates to provide functionality:

Async/Embedded Frameworks


Hardware Abstraction & Embedded I/O


Networking


ESP32-Specific Crates


Display

The built-in 1.9" ST7789 LCD display on the T-Display-S3 has the following pin configuration:

  • Backlight: GPIO38

  • CS: GPIO6

  • DC: GPIO7

  • RST: GPIO5

  • WR: GPIO8

  • RD: GPIO9

  • Data pins: GPIO39-42, GPIO45-48

  • mipidsi


Serialization


Miscellaneous


Setup

1. Clone the repository

git clone https://github.com/yourusername/esp32-homecontrol-no-std-rs.git
cd esp32-homecontrol-no-std-rs

2. Install Rust and the necessary tools

See the ESP-RS book.

Install espup: espup GitHub

espup install
. $HOME/export-esp.sh

3. Build and run the project

cp .env.dist .env
./run.sh

Usage

To flash the firmware to your ESP32 device, run:

cargo run --release

Useful Links

DHCP & Wi-Fi

MQTT Communication

Display Interfaces

Sensors

UI & Graphics

Projects and Games

Networking

Miscellaneous Examples

Tutorials

Advanced Examples

Bitcoin Device, USB, & OTA Updates


This documentation is curated to help you get started with various functionalities, libraries, and examples for ESP32 projects using Rust.

QEMU Testing (Optional)

To test the firmware in QEMU emulator:

  1. Build the release binary:

    cargo build --release
  2. Create a merged image:

    espflash save-image --chip esp32s3 --merge target/xtensa-esp32s3-none-elf/release/esp32-homecontrol image.bin
  3. Run in QEMU:

    ../../Downloads/qemu/bin/qemu-system-xtensa --nographic -machine esp32s3 -drive file=image.bin,if=mtd,format=raw -m 4M

Note: Make sure you have QEMU with Xtensa support installed and adjust the QEMU path according to your installation.

About

A microcontroller-based system for automated plant watering with ESP32. Monitor soil moisture and control watering pump.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published