Home

Awesome

Plantbuddy-edge

Build License

Introduction

Plantbuddy is a solution for monitoring your plants. This is the repository containing the aggregator Firmware for the ESP32C3. Is is responsible for collecting data from the sensors and sending it to the esp-gateway via ESP-Now to ensure long range communication. It is written in bare-metal Rust running via esp-hal and embassy.

Getting Started

Prerequisites

Installation

  1. Clone the repository
git clone https://github.com/plantineers/edge.git
  1. Install Rust nightly and the required target
rustup toolchain install nightly
rustup target add riscv32imc-unknown-none-elf
rustup component add rust-src
  1. Install cargo-espflash
cargo install espflash --git https://github.com/esp-rs/espflash/
  1. After plugging in the ESP32C3, allow access to the serial port and flash the firmware
sudo chmod a+rw /dev/<serial-port> # To permanently allow access, add your user to the dialout or uucp group depending on the distro
cargo run --release --features "<features, comma, seperated>" # See below for available features

Features

For every sensor there is a feature that can be enabled to include it in the build. The following features are available:

FeatureDescriptionOutput
tsl2591Enable the TSL2591 light sensor{"light": <lux>}
hw390Enable the HW390 soil moisture sensor{"soil-moisture": <percentage>}
dht11Enable the DHT11 temperature and humidity sensor{"temperature": <celsius>, "humidity": <percentage>}
dht22Enable the DHT22 temperature and humidity sensor{"temperature": <celsius>, "humidity": <percentage>}

The dht11 and dht22 features are mutually exclusive. Only one of them can be enabled at a time.