Skip to content

X4Destoe/Turty

Repository files navigation

Turty — AI Air Quality Monitoring

This repository contains the software for Turty, an AI‑powered air‑quality guardian designed to run on a Raspberry Pi 4B with a 7" touch display and the Inland 37‑sensor kit.

This project follows the PRD in Turty.txt and the UI design prototype in ui.txt. The current version focuses on:

  • Flask backend with JSON APIs
  • Dashboard UI that matches the pixel‑style design
  • Simulated sensor data (for local development) behind the same data structures that will later be fed by real hardware

Quick start (development on your machine)

cd Turty
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -r requirements.txt

python app.py

Then open http://localhost:5000 in your browser.

On non‑Raspberry‑Pi machines some hardware‑specific packages (like RPi.GPIO) may not install. For local UI/backend development you can comment those out in requirements.txt or install only the core web packages:

pip install flask flask-socketio eventlet

Running on Raspberry Pi

On a Pi 4B with Raspberry Pi OS:

  1. Follow the Installation & Deployment instructions in Turty.txt for OS setup.

  2. Clone or copy this folder to ~/turty.

  3. Create and activate a virtual environment and install requirements:

    cd ~/turty
    python3 -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt
  4. Start the app:

    python app.py
  5. Point Chromium (or the official touch display kiosk browser) at:

    http://localhost:5000
    

Systemd and kiosk autostart service files can be wired up exactly as described in the PRD once the app is deployed to the Pi.

Structure

The final target structure (from the PRD) looks like:

  • app.py — Flask entry point, routes, (later) Socket.IO
  • config.py — thresholds, GPIO pins, sensor intervals
  • hardware/ — sensor manager, GPIO helpers, camera integration
  • ai/ — prediction and recommendation modules
  • data/ — SQLite helpers and logs
  • templates/ — Jinja2 HTML templates (dashboard.html, camera.html, trends.html, settings.html)
  • static/ — CSS, JavaScript, and Turty pixel SVG assets

In this initial commit only a subset is fully implemented; modules are stubbed where appropriate so you can incrementally replace simulation logic with real hardware and models.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors