📟 pmme-device: Add README and export path script
This commit is contained in:
parent
8ee32a8949
commit
8bd69dce67
111
README.org
Normal file
111
README.org
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
#+TITLE: PMME - Particulate Matter Monitoring Ecosystem
|
||||||
|
#+OPTIONS: toc:nil
|
||||||
|
#+AUTHOR:
|
||||||
|
#+DATE:
|
||||||
|
|
||||||
|
* Overview
|
||||||
|
|
||||||
|
A complete IoT solution for monitoring air quality using PM2.5 sensors, built with Rust across embedded, cloud, and mobile platforms.
|
||||||
|
|
||||||
|
* Architecture Overview
|
||||||
|
|
||||||
|
The PMME system consists of four main components working together to provide real-time air quality monitoring:
|
||||||
|
|
||||||
|
#+BEGIN_EXAMPLE
|
||||||
|
[ESP32 Device] --WiFi--> [Cloud Server] <--HTTP--> [Mobile App]
|
||||||
|
| |
|
||||||
|
[Admin Panel] <--WiFi--> [PostgreSQL DB]
|
||||||
|
#+END_EXAMPLE
|
||||||
|
|
||||||
|
* Components
|
||||||
|
|
||||||
|
** 🔧 ESP32 Device (~pmme-device/rust-version/~)
|
||||||
|
|
||||||
|
- *Platform*: ESP32 microcontroller running esp-idf with Rust
|
||||||
|
- *Sensors*: PM2.5 particulate matter sensor (PMS7003)
|
||||||
|
- *Display*: SSD1306 OLED for local readings
|
||||||
|
- *Connectivity*: WiFi for data transmission to cloud
|
||||||
|
- *Features*:
|
||||||
|
- Real-time sensor data collection
|
||||||
|
- Local display of current readings
|
||||||
|
- Automatic cloud data transmission
|
||||||
|
|
||||||
|
** ☁️ Cloud Server (~pmme-cloud/~)
|
||||||
|
|
||||||
|
- *Framework*: Rocket web framework (Rust)
|
||||||
|
- *Database*: PostgreSQL (planned integration)
|
||||||
|
- *Purpose*:
|
||||||
|
- Receive and store sensor data from ESP32 devices
|
||||||
|
- Provide REST API for mobile app data access
|
||||||
|
- Future: Historical data analysis and graphing
|
||||||
|
|
||||||
|
** 📱 Mobile App (~pmme-mobile/~)
|
||||||
|
|
||||||
|
- *Framework*: Tauri (Rust + Web frontend)
|
||||||
|
- *Platform*: Cross-platform mobile application
|
||||||
|
- *Features*:
|
||||||
|
- Connect to cloud server via HTTP
|
||||||
|
- Display current PM2.5 readings
|
||||||
|
- Future: Historical data visualization and graphs
|
||||||
|
- Future: Potential direct ESP32 admin panel access
|
||||||
|
|
||||||
|
** 🌐 Web UI & Admin Panel (~pmme-ui/~)
|
||||||
|
|
||||||
|
- *Framework*: ClojureScript with Shadow CLJS
|
||||||
|
- *Purpose*:
|
||||||
|
- Data visualization interface
|
||||||
|
- Admin panel for ESP32 device management and provisioning
|
||||||
|
|
||||||
|
* Getting Started
|
||||||
|
|
||||||
|
** ESP32 Device Setup
|
||||||
|
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
cd pmme-device/rust-version/
|
||||||
|
# Set up ESP-IDF environment
|
||||||
|
./export-esp.sh
|
||||||
|
cargo build
|
||||||
|
cargo run
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Cloud Server
|
||||||
|
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
cd pmme-cloud/
|
||||||
|
cargo run
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Mobile App
|
||||||
|
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
cd pmme-mobile/
|
||||||
|
npm install
|
||||||
|
npm run tauri dev
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Web UI
|
||||||
|
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
cd pmme-ui/
|
||||||
|
npm install
|
||||||
|
npm run dev
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
* Future Features
|
||||||
|
|
||||||
|
- *PostgreSQL Integration*: Historical data storage and analysis
|
||||||
|
- *Data Visualization*: Graphs and trends in mobile app
|
||||||
|
- *Multi-sensor Support*: Expansion beyond PM2.5 to other environmental sensors
|
||||||
|
- *ESP32 HTTP Server*: Device-hosted admin interface
|
||||||
|
|
||||||
|
* Development Notes
|
||||||
|
|
||||||
|
- The project previously included a C version implementation which has been deprecated in favor of the Rust implementation
|
||||||
|
- The system is designed to be scalable for multiple ESP32 devices reporting to a single cloud instance
|
||||||
|
|
||||||
|
* Tech Stack
|
||||||
|
|
||||||
|
- *Embedded*: Rust + esp-idf
|
||||||
|
- *Backend*: Rust + Rocket + PostgreSQL
|
||||||
|
- *Mobile*: Rust + Tauri
|
||||||
|
- *Web/Admin*: ClojureScript + Shadow CLJS
|
2
pmme-device/rust-version/export-esp.sh
Normal file
2
pmme-device/rust-version/export-esp.sh
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export PATH="/home/joe/.local/share/rustup/toolchains/esp/xtensa-esp-elf/esp-14.2.0_20240906/xtensa-esp-elf/bin:$PATH"
|
||||||
|
export LIBCLANG_PATH="/home/joe/.local/share/rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-19.1.2_20250225/esp-clang/lib"
|
Loading…
x
Reference in New Issue
Block a user