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 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 Digital → GPIO10
  • 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
    • 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

These crates provide support for asynchronous programming models and embedded futures.


Hardware Abstraction & Embedded I/O

These crates are used to interact with embedded hardware and interfaces.


Networking

Crates for network communication and protocols.


ESP32-Specific Crates

Crates related to ESP32 platforms, Wi-Fi support, and memory management.


Display

The project uses the built-in 1.9" ST7789 LCD display (170x320) on the T-Display-S3 with the following pins:

  • Backlight: GPIO38

  • CS: GPIO6

  • DC: GPIO7

  • RST: GPIO5

  • WR: GPIO8

  • RD: GPIO9

  • Data pins: GPIO39-42, GPIO45-48

  • mipidsi


Sensor Support

Crates for interfacing with sensors like DHT11.


Serialization

Crates for data serialization and deserialization.


Miscellaneous

Other supporting crates for various use cases.


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

https://docs.esp-rs.org/book/introduction.html

Install espup https://github.com/esp-rs/espup and probe-rs https://github.com/probe-rs/probe-rs

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, use the following command:

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.

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